After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 156793 - [PATCH] gst-register should warn if not run as root
[PATCH] gst-register should warn if not run as root
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-29 10:45 UTC by Tim-Philipp Müller
Modified: 2005-08-29 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.58 KB, patch)
2004-10-29 10:46 UTC, Tim-Philipp Müller
none Details | Review

Description Tim-Philipp Müller 2004-10-29 10:45:27 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
Comment 1 Tim-Philipp Müller 2004-10-29 10:46:44 UTC
Created attachment 33195 [details] [review]
proposed patch
Comment 2 Tim-Philipp Müller 2004-10-29 10:49:52 UTC
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 
 
 
Comment 3 Thomas Vander Stichele 2004-12-16 18:54:30 UTC
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 ?
Comment 4 Tim-Philipp Müller 2004-12-16 21:15:32 UTC
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