mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
ptp-helper: Make sure that we are running setuid root if configured that way
This commit is contained in:
parent
d33784ccd0
commit
c7c1dcd346
1 changed files with 5 additions and 0 deletions
|
@ -619,6 +619,11 @@ main (gint argc, gchar ** argv)
|
|||
GMainLoop *loop;
|
||||
GError *err = NULL;
|
||||
|
||||
#ifdef HAVE_PTP_HELPER_SETUID
|
||||
if (setuid (0) < 0)
|
||||
g_error ("not running with superuser privileges");
|
||||
#endif
|
||||
|
||||
opt_ctx = g_option_context_new ("- GStreamer PTP helper process");
|
||||
g_option_context_add_main_entries (opt_ctx, opt_entries, NULL);
|
||||
if (!g_option_context_parse (opt_ctx, &argc, &argv, &err))
|
||||
|
|
Loading…
Reference in a new issue