for ( ; b; name = b + 1, b = strchr(name, '/')) {
*b = '\0';
- while (mkdir_defmode(backup_dir_buf) < 0) {
+ while (do_mkdir(backup_dir_buf, ACCESSPERMS) < 0) {
if (errno == EEXIST) {
val = validate_backup_dir();
if (val > 0)
exit_cleanup(RERR_SYNTAX);
}
- if (mkdir_defmode(dest_path) != 0) {
+ if (do_mkdir(dest_path, ACCESSPERMS) != 0) {
rsyserr(FERROR, errno, "mkdir %s failed",
full_fname(dest_path));
exit_cleanup(RERR_FILEIO);
}
}
-/* This creates a new directory with default permissions. Now that we
- * leave the original umask set, we can just mkdir with mode 777. */
-int mkdir_defmode(char *fname)
-{
- return do_mkdir(fname, ACCESSPERMS);
-}
-
/* Create any necessary directories in fname. Any missing directories are
* created with default permissions. Returns < 0 on error, or the number
* of directories created. */