ALT Linux Bugzilla
– Attachment 5021 Details for
Bug 23377
Возможность запуска alteratord, alterator-{standalone,cmdline} от любого юзера
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Добавляет интеллект по поиску каталога для сокета и лога
alteratord-not.only.4.root.patch (text/plain), 1.79 KB, created by
Lenar Shakirov
on 2011-07-22 13:30:03 MSK
(
hide
)
Description:
Добавляет интеллект по поиску каталога для сокета и лога
Filename:
MIME Type:
Creator:
Lenar Shakirov
Created:
2011-07-22 13:30:03 MSK
Size:
1.79 KB
patch
obsolete
>--- /usr/share/alterator/interfaces/guile/d.scm.orig 2011-07-22 13:09:06 +0400 >+++ /usr/share/alterator/interfaces/guile/d.scm 2011-07-22 13:12:30 +0400 >@@ -16,15 +16,23 @@ > d-wait > d)) > >-(define *d-socket* "/var/run/alteratord/.socket") >-(define *d-user* "root") >-(define *d-group* "_alteratord") >+(define *d-user* (passwd:name (getpwuid (getuid)))) >+(define *tmpdir* (string-append (if (string=? *d-user* "root") >+ "/tmp" >+ (or (getenv "TMPDIR") "/tmp")) >+ "/alterator")) >+(define *d-socket* (string-append *tmpdir* "/.socket")) >+(define *d-group* (if (string=? *d-user* "root") >+ "_alteratord" >+ *d-user*)) > (define *d-control* "/etc/rc.d/init.d/alteratord") > (define *d-process* #f) > (define *d-restart-service* #f) > > (define *null-port* (open-output-file "/dev/null")) > >+(or (access? *tmpdir* W_OK) (mkdir *tmpdir*)) >+ > ;; conversion between text and s-exp > > (define (text->scm str) >--- /usr/sbin/alteratord.orig 2011-07-22 13:20:31 +0400 >+++ /usr/sbin/alteratord 2011-01-11 17:40:58 +0300 >@@ -50,10 +50,16 @@ > (and (option-ref options 'help #f) (usage)) > (and (option-ref options 'debug #f) (turn-on-debugging)) > >+(define *cuser* (passwd:name (getpwuid (getuid)))) >+(define *tmpdir* (string-append (if (string=? *cuser* "root") >+ "/tmp" >+ (or (getenv "TMPDIR") "/tmp")) >+ "/alterator")) >+ > (if (option-ref options 'local #f) > (alterator-init-local) > (begin (alterator-init-global) >- (prepare-log "/var/log/alteratord.log"))) >+ (prepare-log (string-append *tmpdir* "/alteratord.log")))) > > (with-exit-handler > (lambda()
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 23377
: 5021