diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-17 13:16:44 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-17 13:16:44 +0000 |
commit | a768128281ea07a7f0b0a2ec773a40dbfecd1072 (patch) | |
tree | 1a4ae7f053dffe70f01338c6d4a35d3448387374 /srUtils.c | |
parent | 648370956683f65c8d60ba71ca158bf68d27db9a (diff) | |
download | rsyslog-a768128281ea07a7f0b0a2ec773a40dbfecd1072.tar.gz rsyslog-a768128281ea07a7f0b0a2ec773a40dbfecd1072.tar.xz rsyslog-a768128281ea07a7f0b0a2ec773a40dbfecd1072.zip |
added $FailOnChownFailure config parameter
Diffstat (limited to 'srUtils.c')
-rwxr-xr-x | srUtils.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -112,7 +112,7 @@ uchar *srUtilStrDup(uchar *pOld, size_t len) * are to be created with. */ int makeFileParentDirs(uchar *szFile, size_t lenFile, mode_t mode, - uid_t uid, gid_t gid) + uid_t uid, gid_t gid, int bFailOnChown) { uchar *p; uchar *pszWork; @@ -135,7 +135,11 @@ int makeFileParentDirs(uchar *szFile, size_t lenFile, mode_t mode, if(uid != -1 || gid != -1) { /* we need to set owner/group */ if(chown(pszWork, uid, gid) != 0) - bErr = 1; + if(bFailOnChown) + bErr = 1; + /* silently ignore if configured + * to do so. + */ } } else bErr = 1; |