version 1.24, 2003/06/03 02:56:14 |
version 1.25, 2004/01/15 19:12:31 |
|
|
log(lfp, "%s: no password entry for uid %u \n", |
log(lfp, "%s: no password entry for uid %u \n", |
target, stb.st_uid); |
target, stb.st_uid); |
pw = NULL; |
pw = NULL; |
(void) snprintf(user, sizeof(user), ":%lu", stb.st_uid); |
(void) snprintf(user, sizeof(user), ":%u", stb.st_uid); |
} |
} |
if (gr == NULL || gr->gr_gid != stb.st_gid) |
if (gr == NULL || gr->gr_gid != stb.st_gid) |
if ((gr = getgrgid(stb.st_gid)) == NULL) { |
if ((gr = getgrgid(stb.st_gid)) == NULL) { |
log(lfp, "%s: no name for group %u\n", |
log(lfp, "%s: no name for group %u\n", |
target, stb.st_gid); |
target, stb.st_gid); |
gr = NULL; |
gr = NULL; |
(void) snprintf(group, sizeof(group), ":%lu", |
(void) snprintf(group, sizeof(group), ":%u", |
stb.st_gid); |
stb.st_gid); |
} |
} |
if (u == 1) { |
if (u == 1) { |
|
|
} |
} |
} |
} |
(void) snprintf(buf, sizeof(buf), "K%o %o %qd %ld %s %s %s\n", |
(void) snprintf(buf, sizeof(buf), "K%o %o %qd %ld %s %s %s\n", |
opts, stb.st_mode & 07777, stb.st_size, stb.st_mtime, |
opts, stb.st_mode & 07777, stb.st_size, |
protoname(), protogroup(), rname); |
(long)stb.st_mtime, protoname(), protogroup(), rname); |
if (debug) |
if (debug) |
printf("buf = %s", buf); |
printf("buf = %s", buf); |
(void) write(rem, buf, strlen(buf)); |
(void) write(rem, buf, strlen(buf)); |
|
|
return; |
return; |
} |
} |
(void) snprintf(buf, sizeof(buf), "R%o %o %qd %ld %s %s %s\n", opts, |
(void) snprintf(buf, sizeof(buf), "R%o %o %qd %ld %s %s %s\n", opts, |
stb.st_mode & 07777, stb.st_size, stb.st_mtime, |
stb.st_mode & 07777, stb.st_size, (long)stb.st_mtime, |
protoname(), protogroup(), rname); |
protoname(), protogroup(), rname); |
if (debug) |
if (debug) |
printf("buf = %s", buf); |
printf("buf = %s", buf); |
|
|
time_t mtime; |
time_t mtime; |
|
|
if (debug) |
if (debug) |
printf("update(%s, %x, %x)\n", rname, opts, stp); |
printf("update(%s, %x, %p)\n", rname, opts, stp); |
|
|
/* |
/* |
* Check to see if the file exists on the remote machine. |
* Check to see if the file exists on the remote machine. |
|
|
switch (stb.st_mode & S_IFMT) { |
switch (stb.st_mode & S_IFMT) { |
case S_IFREG: |
case S_IFREG: |
(void) snprintf(buf, sizeof(buf), "Y%qd %ld\n", stb.st_size, |
(void) snprintf(buf, sizeof(buf), "Y%qd %ld\n", stb.st_size, |
stb.st_mtime); |
(long)stb.st_mtime); |
(void) write(rem, buf, strlen(buf)); |
(void) write(rem, buf, strlen(buf)); |
break; |
break; |
|
|