Imported Upstream version 2.5.2p1
[debian/amanda] / common-src / file.c
index 62cf171bab4da3dc2c53ce53c4a3dece1ddabc62..cadcf0a31499b47c240a68451a75d59f71422ce5 100644 (file)
@@ -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.