ALT Linux Bugzilla
– Attachment 3201 Details for
Bug 18463
Дублирование пакета spawn-fcgi
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
drop prilileges patch
trac-drop-privileges.patch (text/plain), 1.45 KB, created by
enp
on 2009-01-10 00:29:46 MSK
(
hide
)
Description:
drop prilileges patch
Filename:
MIME Type:
Creator:
enp
Created:
2009-01-10 00:29:46 MSK
Size:
1.45 KB
patch
obsolete
>--- /usr/lib/python2.5/site-packages/trac/web/standalone.py 2008-11-16 16:58:09 +0000 >+++ /root/standalone.py 2009-01-09 21:25:12 +0000 >@@ -22,6 +22,8 @@ > import pkg_resources > import os > import sys >+import grp >+import pwd > from SocketServer import ThreadingMixIn > > from trac import __version__ as VERSION >@@ -169,6 +171,12 @@ > parser.add_option('--pidfile', action='store', > dest='pidfile', > help='When daemonizing, file to which to write pid') >+ parser.add_option('--user', action='store', >+ dest='user', >+ help='Drop privileges to user') >+ parser.add_option('--group', action='store', >+ dest='group', >+ help='Drop privileges to group') > parser.add_option('--umask', action='store', type='int', dest='umask', > metavar='MASK', > help='When daemonizing, file mode creation mask ' >@@ -244,6 +252,12 @@ > daemon.daemonize(pidfile=options.pidfile, progname='tracd', > umask=options.umask) > >+ if options.group: >+ os.setgid(grp.getgrnam(options.group)[2]) >+ >+ if options.user: >+ os.setuid(pwd.getpwnam(options.user)[2]) >+ > if options.autoreload: > def modification_callback(file): > print>>sys.stderr, 'Detected modification of %s, restarting.' \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18463
: 3201 |
3202