Set root shell prompt in /etc/profile ?
Christian Franke
Christian.Franke@t-online.de
Fri Sep 4 22:00:00 GMT 2009
When running as member of admin group a Cygwin process normally has
root-like privileges. But this fact cannot be checked with 'geteuid() ==
0'. The shell never sets the default root prompt '#', except if the user
is mapped to uid 0 in /etc/passwd.
Is there a generic way to set '#' via /etc/profile ?
The attached patch works for me on Cygwin 1.7., but it relies on a
runtime file write check.
(It also requires ACL support in /tmp and would not work on 1.5).
Is there a better way to do this?
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: set-root-prompt.patch
Type: text/x-patch
Size: 1636 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090904/c3398e74/attachment.bin>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list