GNOME Bugzilla – Bug 156793
[PATCH] gst-register should warn if not run as root
Last modified: 2005-08-29 15:08:58 UTC
I think it would be a good idea to make gst-register check whether it is being run as root and print a message if it is not. Attached patch * makes gst-register exit with a message if effective uid != 0 * requires user to specify the '--user-registry' argument on the command line to override the user id check. * adds --user-registry to man page All of this only on unix systems. Cheers -Tim
Created attachment 33195 [details] [review] proposed patch
Addendum: Patch also gets rid of the confusing Rebuilding user_registry (/root/.gstreamer-0.8/registry.xml) ... when gst-register is run as root. Cheers and sorry for the flood -Tim
not sure this is necessary. people can in fact drop plugins in their home directory and register them with gst-register, and this is correct behaviour. Is this trying to solve an actual problem, and if so, which ?
With this patch people can still drop plugins in their home directory, they only have to specify the --user-registry command line option. The 0.001% of people who need this will find about it in a second from the man page and are unlikely to have a problem with this. What this patch solves is the common <a> did you run gst-register? <b> yes, but it still doesn't work <a> did you run it as root? <b> no, I didn't. Now it says 'wrote registry /root/.gstreamer-0.8/registry.xml' ... further confusion ... as witnessed multiple times on IRC. I am not arguing this is something that really really is a problem and needs to be applied, but I do think this is an improvement. The improvement is that it enables people to help themselves and do the right thing by themselves through the warning message. Finally, the 'Rebuilding user registry /root/.gstreamer-0.8/registry.xml' (or similar) message when you run gst-register as root is simply confusing and should be dropped completely IMHO. There is no good reason why the root user needs to drop plugins into his home directory either as far as I can see. Cheers -Tim