Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 259880 Details for
Bug 350213
net-p2p/deluge uses single rc script for two daemons
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixed group support for deluge-web
deluge-web-setuid.patch (text/plain), 2.11 KB, created by
Cameron Tacklind
on 2011-01-14 19:49:38 UTC
(
hide
)
Description:
Fixed group support for deluge-web
Filename:
MIME Type:
Creator:
Cameron Tacklind
Created:
2011-01-14 19:49:38 UTC
Size:
2.11 KB
patch
obsolete
> deluge/ui/web/web.py | 24 ++++++++++++++++++++++++ > 1 files changed, 24 insertions(+), 0 deletions(-) > >diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py >index a2b5765..3d9f1c6 100644 >--- a/deluge/ui/web/web.py >+++ b/deluge/ui/web/web.py >@@ -34,6 +34,8 @@ > # > > import os >+import pwd >+import grp > > from deluge.ui.ui import _UI, UI > from optparse import OptionGroup >@@ -59,6 +61,15 @@ def __init__(self): > group.add_option("-f", "--fork", dest="fork", > help="Fork the web interface process into the background", > action="store_true", default=False) >+ group.add_option("-P", "--pidfile", dest="pidfile", type="str", >+ help="Use pidfile to store process id", >+ action="store", default=None) >+ group.add_option("-U", "--user", dest="user", type="str", >+ help="User to switch to. Only use it when starting as root", >+ action="store", default=None) >+ group.add_option("-g", "--group", dest="group", type="str", >+ help="Group to switch to. Only use it when starting as root", >+ action="store", default=None) > group.add_option("-p", "--port", dest="port", type="int", > help="Sets the port to be used for the webserver", > action="store", default=None) >@@ -103,6 +114,19 @@ def start(self): > # use that may prevent a filesystem unmount. > import deluge.configmanager > os.chdir(deluge.configmanager.get_config_dir()) >+ >+ if self.options.pidfile: >+ open(self.options.pidfile, "wb").write("%d\n" % os.getpid()) >+ >+ if not deluge.common.windows_check(): >+ if self.options.group: >+ if not self.options.group.isdigit(): >+ self.options.group = grp.getgrnam(self.options.group)[2] >+ os.setuid(self.options.group) >+ if self.options.user: >+ if not self.options.user.isdigit(): >+ self.options.user = pwd.getpwnam(self.options.user)[2] >+ os.setuid(self.options.user) > > import server > self.__server = server.DelugeWeb()
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 350213
:
258495
|
258969
|
258971
|
258973
|
258975
|
258976
|
258978
|
258979
|
259879
| 259880