search for: undo_make_mutable

Displaying 8 results from an estimated 8 matches for "undo_make_mutable".

2012 May 07
0
Solved problem with hard links and schg flag under FreeBSD
...SUPPORT_FORCE_CHANGE if (force_change && (errno == EPERM || errno == EACCES)) { char parent[MAXPATHLEN]; int parent_flags; int saved_errno = errno; int file_flags = make_mutable(fname1, NULL, NO_FFLAGS, force_change); if (file_flags) { int ret = link(fname1, fname2); undo_make_mutable(fname1, file_flags); if (ret == 0) return 0; } parent_flags = make_parentdir_mutable(fname2, force_change, parent, sizeof parent); if (parent_flags) { int ret = link(fname1, fname2); undo_make_mutable(parent, parent_flags); if (ret == 0) return 0; } errno = saved_errno...
2008 Feb 15
4
Revised flags patch
...ackup(const char return 0; while (1) { - if (do_rename(fname, fnamebak) == 0) { +#ifdef SUPPORT_FLAGS + STRUCT_STAT st2; + + link_stat(fname, &st2, 0); + make_mutable(fname, st2.st_mode, st2.st_flags); +#endif + if (do_rename(fname, fnamebak) == 0) + { +#ifdef SUPPORT_FLAGS + undo_make_mutable(fnamebak, st2.st_mode, st2.st_flags); +#endif if (verbose > 1) { rprintf(FINFO, "backed up %s to %s\n", fname, fnamebak); diff -brpu rsync-3.0.0pre9/compat.c rsync-3.0.0pre9-flags/compat.c --- rsync-3.0.0pre9/compat.c Sat Jan 26 20:58:17 2008 +++ rsync-3.0.0pre9-flags/...
2009 Mar 11
0
Odd issue with locked directories and Mac OS X
...st) < 0) + rprintf(FINFO, "Failed to stat %s!\n", full_fname(file->dirname)); + else { + if (force_change && make_mutable(file->dirname, sx.st.st_mode, sx.st.st_flags, force_change) > 0) { + fd = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); + undo_make_mutable(file->dirname, sx.st.st_flags); + } + } + } +#endif + if (fd == -1) { rsyserr(FERROR_XFER, errno, "mkstemp %s failed", full_fname(fnametmp)); -------------- next part -------------- HTML attachment scrubbed and removed
2009 Oct 01
0
patch: --force-change for hard links
...mp;& errno == EPERM) { + STRUCT_STAT st; + + if (x_lstat(fname1, &st, NULL) == 0 + && make_mutable(fname1, st.st_mode, st.st_flags, force_change) > 0) { + int ret = link(fname1, fname2); + undo_make_mutable(fname1, st.st_flags); + if (ret == 0) + return 0; + } + errno = EPERM; + } +#endif + return -1; } #endif
2008 Apr 14
0
[PATCH] xattrs not set on locked files that already exist on target
...+#ifdef SUPPORT_FORCE_CHANGE + if (force_change) + make_mutable(fname, sxp->st.st_mode, sxp->st.st_flags, force_change); +#endif + #ifdef SUPPORT_ACLS if (preserve_acls && !S_ISLNK(file->mode) && !ACL_READY(*sxp)) get_acl(fname, sxp); ## Note: I'm not using undo_make_mutable because set_fileflags is called at the end of this method if we care about fileflags.
2011 Mar 16
3
[Bug 8019] New: Various improvements to the fileflags patch
...98 Several changes to the fileflags.diff patch The attached patch improves the following: - The fileflags variable was occasionally referenced without being initialized - sx.st.st_flags is initialized in flist.c:send_file_name() so get_xattr has access to fileflags - rsync.c: Errors that occur in undo_make_mutable are now reported (I think this also resolves an issue in which rsync would report "Unknown error (0)") - rsync.c: make_mutable is now called in set_file_attrs allowing set_file_attrs to apply acls, xattrs, times, etc. to files in locked directories. - syscall.c: Added make_mutable/force_c...
2008 Jun 25
2
DO NOT REPLY [Bug 5565] New: xattrs not set on locked files that already exist on target
...if (force_change) + make_mutable(fname, sxp->st.st_mode, sxp->st.st_flags, force_change); +#endif + #ifdef SUPPORT_ACLS if (preserve_acls && !S_ISLNK(file->mode) && !ACL_READY(*sxp)) get_acl(fname, sxp); ## Note: I'm not using undo_make_mutable because set_fileflags is called at the end of this method if we care about fileflags. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
2008 Mar 04
1
Several changes missing from [HEAD] fileflags.diff
...+269,8 @@ int read_ndx_and_attrs(int f_in, int *if > void free_sums(struct sum_struct *s); > mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms, > int exists); > +int make_mutable(const char *fname, mode_t mode, uint32 fileflags, > uint32 iflags); > +int undo_make_mutable(const char *fname, uint32 fileflags); > int set_file_attrs(const char *fname, struct file_struct *file, > stat_x *sxp, > const char *fnamecmp, int flags); > RETSIGTYPE sig_int(UNUSED(int val)); > @@ -293,11 +295,12 @@ int sock_exec(const char *prog); > int do_unlink(con...