Displaying 17 results from an estimated 17 matches for "initaccessperm".
Did you mean:
initaccessperms
2004 Apr 27
1
[PATCH] Inplace option for rsync
...are then correctly updated after
- * the lchown. Thanks to snabb@epipe.fi for pointing
- * this out. We also set it initially without group
- * access because of a similar race condition. */
- fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS);
-
- /* in most cases parent directories will already exist
- * because their information should have been previously
- * transferred, but that may not be the case with -R */
- if (fd2 == -1 && relative_paths && errno == EN...
2004 Feb 17
1
[patch] Make robust_rename() handle EXDEV.
...2004-02-17 10:13:31.000000000 -0500
@@ -236,21 +236,8 @@
/* move tmp file over real file */
if (robust_rename(fnametmp,fname) != 0) {
- if (errno == EXDEV) {
- /* rename failed on cross-filesystem link.
- Copy the file instead. */
- if (copy_file(fnametmp,fname, file->mode & INITACCESSPERMS)) {
- rprintf(FERROR, "copy %s -> \"%s\": %s\n",
- full_fname(fnametmp), fname,
- strerror(errno));
- } else {
- set_perms(fname,file,NULL,0);
- }
- } else {
- rprintf(FERROR,"rename %s -> \"%s\": %s\n",
- full_fname(fnametmp),...
2002 Jun 07
0
problem related to filename length
...no race
+ condition. They are then correctly updated after
+ the lchown. Thanks to snabb@epipe.fi for pointing
+ this out. We also set it initially without group
+ access because of a similar race condition. */
+
+ fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS);
+ }while(!flag && (retry++ < max_retry) &&
+ (fd2 == -1 && errno == EEXIST));
+ if(flag) continue;
}
-
- strlcpy(template, fnametmp, sizeof(template));
-
- /* we initially set the perms without the
- setuid/setgid bits to ensure that there is no race...
2003 Jan 18
1
possible typo/bug in receiver.c
...race
condition. They are then correctly updated after
the lchown. Thanks to snabb@epipe.fi for pointing
this out. We also set it initially without group
access because of a similar race condition. */
fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS);
if (fd2 == -1) {
rprintf(FERROR,"mkstemp %s failed: %s\n",fnametmp,strerror(errno));
receive_data(f_in,buf,-1,NULL,file->length);
if (buf) unmap_file(buf);
if (fd1 != -1) close(fd1);
continue;...
2001 Nov 13
2
direct write patch
...28,7 +438,7 @@
the lchown. Thanks to snabb@epipe.fi for pointing
this out. We also set it initially without group
access because of a similar race condition. */
- fd2 = do_open(fnametmp,O_WRONLY|O_CREAT|O_EXCL,
+ fd2 = do_open(fnametmp,write_flags,
file->mode & INITACCESSPERMS);
/* in most cases parent directories will already exist
@@ -436,7 +446,7 @@
transferred, but that may not be the case with -R */
if (fd2 == -1 && relative_paths && errno == ENOENT &&
create_directory_path(fnametmp) == 0) {
- fd2 = do_open(fnametmp,O...
2004 Apr 11
1
fchmod in do_mkstemp? (patch included)
...04 16:50:40 -0000 1.75
+++ receiver.c 10 Apr 2004 23:48:36 -0000
@@ -424,7 +424,7 @@
* the lchown. Thanks to snabb@epipe.fi for pointing
* this out. We also set it initially without group
* access because of a similar race condition. */
- fd2 = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS);
+ fd2 = do_mkstemp(fnametmp);
/* in most cases parent directories will already exist
* because their information should have been previously
@@ -432,7 +432,7 @@
if (fd2 == -1 && relative_paths && errno == ENOENT &&
create_directory_path(fnametmp, orig_...
2002 Dec 05
1
Patch to ignore exluded files.
...if (robust_rename(fnametmp,fname) != 0) {
> if (errno == EXDEV) {
> /* rename failed on cross-filesystem link.
> Copy the file instead. */
> - if (copy_file(fnametmp,fname, file->mode &
> INITACCESSPERMS)) {
> + if (copy_file(fnametmp,fname, file->mode)) {
> rprintf(FERROR,"copy %s -> %s : %s\n",
> fnametmp,fname,strerror(errno));
> } else {
>
> I...
2009 Mar 11
0
Odd issue with locked directories and Mac OS X
...e->dirname, &sx.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
2002 Jul 24
0
couple of minor fixes to rsync 2.5.5
...over real file */
if (robust_rename(fnametmp,fname) != 0) {
if (errno == EXDEV) {
/* rename failed on cross-filesystem link.
Copy the file instead. */
- if (copy_file(fnametmp,fname, file->mode &
INITACCESSPERMS)) {
+ if (copy_file(fnametmp,fname, file->mode)) {
rprintf(FERROR,"copy %s -> %s : %s\n",
fnametmp,fname,strerror(errno));
} else {
I hope these modifications don&...
2004 Jun 21
0
Problem found and fixed with --update
...ime) > 0) {
+ rprintf(FINFO, "target \"%s\" newer, deleting \"%s\"\n",
+ fname, fnametmp);
+ do_unlink(fnametmp);
+ return;
+ }
+ }
+ }
+
/* move tmp file over real file */
+
ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
if (ret < 0) {
rprintf(FERROR, "%s %s -> \"%s\": %s\n",
--
=====================================================================
On Air Digital USA http://www.onairusa.com
Dallas, Texas a division of Smarts Broadcas...
2003 Feb 19
0
FW: compare st_mode & 07777, or Aix dirs always differ
...t; #endif
>
>ALLPERMS is a BSDism that even shows up in the linux headers.
>
>Since POSIX and SUSv3 specify that the actual mode_t
>bits are implementation specific I'm just a trifle leery of
>adding this in. We support some rather strange systems
>although ACCESSPERMS and INITACCESSPERMS don't appear to
>have bitten us so far. My paranoid side says that the
>actual value should be set in configure and default to ~0.
I did some research and found that ALLPERMS is not in POSIX-96 or POSIX-01. Therefore, I don't
think it is wise to use it in rsync, unless one were to...
2003 Feb 08
1
compare st_mode & 07777, or Aix dirs always differ
Under Aix directories have the mode 024xxxx instead of the customary
04xxxx. Because of this when you sync a directory to or from an Aix
system it's never up to date.
Here is a patch which fixes this. It causes rsync to look at only the
bits that chmod actually influences, 07777, when deciding whether or not
the modes differ.
I was surprised there wasn't an existing constant for 07777,
2003 May 20
0
patch for better handling of write failures (disk full)
...e_after) {
diff -Nru a/rsync/rsync.c b/rsync/rsync.c
--- a/rsync/rsync.c Tue May 20 08:56:43 2003
+++ b/rsync/rsync.c Tue May 20 08:56:43 2003
@@ -243,8 +243,14 @@
/* rename failed on cross-filesystem link.
Copy the file instead. */
if (copy_file(fnametmp,fname, file->mode & INITACCESSPERMS)) {
- rprintf(FERROR,"copy %s -> %s : %s\n",
+ int err = errno;
+ extern int keep_partial;
+ rprintf(FERROR,"error copy %s -> %s : %s\n",
fnametmp,fname,strerror(errno));
+ /* remove partial result if disk full */
+ if (err == ENOSPC && !ke...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...extern int preserve_gid;
extern int preserve_perms;
extern int make_backups;
+extern char *link_by_hash_dir;
/*
@@ -236,8 +237,13 @@
if (make_backups && !make_backup(fname))
return;
- /* move tmp file over real file */
- ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
+#ifdef HAVE_LINK
+ if (link_by_hash_dir)
+ ret = link_by_hash(fnametmp,fname,file);
+ else
+#endif
+ ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
+
if (ret != 0) {
rprintf(FERROR, "%s %s -> \"%s\": %s\n",
ret == -2 ? "copy&...
2003 May 23
1
PATCH: better handling for write failures (disk full)
...e_after) {
diff -Nru a/rsync/rsync.c b/rsync/rsync.c
--- a/rsync/rsync.c Tue May 20 08:56:43 2003
+++ b/rsync/rsync.c Tue May 20 08:56:43 2003
@@ -243,8 +243,14 @@
/* rename failed on cross-filesystem link.
Copy the file instead. */
if (copy_file(fnametmp,fname, file->mode & INITACCESSPERMS)) {
- rprintf(FERROR,"copy %s -> %s : %s\n",
+ int err = errno;
+ extern int keep_partial;
+ rprintf(FERROR,"error copy %s -> %s : %s\n",
fnametmp,fname,strerror(errno));
+ /* remove partial result if disk full */
+ if (err == ENOSPC && !ke...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...@ -236,6 +237,12 @@
if (make_backups && !make_backup(fname))
return;
+#ifdef HAVE_LINK
+ if (link_by_hash_dir) {
+ if (link_by_hash(fnametmp,fname,file) != 0)
+ return;
+ } else
+#endif
/* move tmp file over real file */
ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
if (ret != 0) {
patchwork diff rsync.h
--- rsync.h 2004-02-23 10:22:51.000000000 -0500
+++ rsync.h 2004-02-23 10:22:51.000000000 -0500
@@ -513,6 +513,14 @@
int current_file_index;
};
+struct hashfile_struct {
+ struct hashfile_struct *next;
+ struct hashfile_struct *prev;
+ char *name;
+...
2004 Apr 20
1
improved atime patch
...}
+ }
change_uid = am_root && preserve_uid && st->st_uid != file->uid;
change_gid = preserve_gid && file->gid != GID_NONE
@@ -236,7 +251,7 @@
return;
/* move tmp file over real file */
- ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
+ ret = robust_rename(fnametmp, fname, 0600);
if (ret < 0) {
rprintf(FERROR, "%s %s -> \"%s\": %s\n",
ret == -2 ? "copy" : "rename",
Index: rsync.h
===================================================================
RCS file: /cvsroot/rsy...