Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 80870 Details for
Bug 124314
net-misc/cfengine: no ROOT support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
cfengine-2.1.18-cfkey-root.patch
cfengine-2.1.18-cfkey-root.patch (text/plain), 1.24 KB, created by
solar (RETIRED)
on 2006-02-27 16:44:09 UTC
(
hide
)
Description:
cfengine-2.1.18-cfkey-root.patch
Filename:
MIME Type:
Creator:
solar (RETIRED)
Created:
2006-02-27 16:44:09 UTC
Size:
1.24 KB
patch
obsolete
>--- src/cfkey.c 2006-02-28 00:04:26.000000000 +0000 >+++ src/cfkey.c 2006-02-28 00:25:38.000000000 +0000 >@@ -34,12 +34,12 @@ > > char CFLOCK[CF_BUFSIZE]; > >-void Initialize ARGLIST((void)); >+void Initialize ARGLIST((const char *)); > int RecursiveTidySpecialArea ARGLIST((char *name, struct Tidy *tp, int maxrecurse, struct stat *sb)); > > /*****************************************************************************/ > >-int main() >+int main(int argc, char **argv) > > { unsigned long err; > RSA *pair; >@@ -50,7 +50,12 @@ > EVP_CIPHER *cipher = EVP_des_ede3_cbc(); > > >-Initialize(); >+ if (argc > 1) >+ if (argv[1][0] != '/') { >+ fprintf(stderr, "%s: Must use explicit full paths when using a root prefix\n", argv[1]); >+ exit(1); >+ } >+Initialize(argc > 1 ? argv[1] : ""); > > if (stat(CFPRIVKEYFILE,&statbuf) != -1) > { >@@ -143,13 +148,14 @@ > /* Level 1 */ > /*******************************************************************/ > >-void Initialize() >+void Initialize(const char *root) > > { >-umask(077); >+ umask(077); >+ > /* XXX Initialize workdir for non privileged users */ > >- strcpy(CFWORKDIR,WORKDIR); >+ snprintf(CFWORKDIR, sizeof(CFWORKDIR), "%s%s", root, WORKDIR); > > if (geteuid() > 0) > {
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 124314
: 80870