X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Ffile.c;h=cadcf0a31499b47c240a68451a75d59f71422ce5;hb=d3b2175e084f88c8736ad7073eacbf4670147aec;hp=62cf171bab4da3dc2c53ce53c4a3dece1ddabc62;hpb=34197d9f46a5f4e944378cbb65fca32ee0eec7b9;p=debian%2Famanda diff --git a/common-src/file.c b/common-src/file.c index 62cf171..cadcf0a 100644 --- a/common-src/file.c +++ b/common-src/file.c @@ -23,7 +23,7 @@ * Author: AMANDA core development group. */ /* - * $Id: file.c,v 1.40.2.1 2006/11/24 18:05:05 martinea Exp $ + * $Id: file.c,v 1.40 2006/07/19 17:41:15 martinea Exp $ * * file and directory bashing routines */ @@ -31,7 +31,6 @@ #include "amanda.h" #include "util.h" -void amanda_setup(int argc, char **argv, int setup_flags); static int mk1dir(const char *, mode_t, uid_t, gid_t); static void areads_getbuf(const char *s, int l, int fd); @@ -54,8 +53,8 @@ mk1dir( int rc; /* return code */ if((rc = mkdir(dir, mode)) == 0) { - if ((rc = chmod(dir, mode)) == 0) { /* mkdir() affected by the umask */ - rc = chown(dir, uid, gid); + if ((rc = chown(dir, uid, gid)) == 0) { /* mkdir() affected by the umask */ + rc = chmod(dir, mode); } } else { /* maybe someone beat us to it */ int serrno; @@ -156,28 +155,6 @@ rmpdir( } -/* - *===================================================================== - * Do Amanda setup for all programs. - * - * void amanda_setup (int argc, char **argv, int setup_flags) - * - * entry: setup_flags (see AMANDA_SETUP_FLAG_xxx) - * exit: none - *===================================================================== - */ - -void -amanda_setup ( - int argc, - char ** argv, - int setup_flags) -{ - (void)argc; /* Quiet unused parameter warning */ - (void)argv; /* Quiet unused parameter warning */ - (void)setup_flags; /* Quiet unused parameter warning */ -} - /* *===================================================================== * Change directory to a "safe" location and set some base environment.