diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-07-12 03:10:04 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-07-12 03:10:04 +0000 |
commit | 930b749c2db3119670ef9954cf90ac429e9d3612 (patch) | |
tree | 84ac9dd8bf3eb0edb3e99b962961914365e456cb /usr.bin/rdistd | |
parent | cfd94e8cc8926ac62a9aa5de17ecf46678be7c39 (diff) |
Rename 'link' parameter to eliminate shadow warnings
Diffstat (limited to 'usr.bin/rdistd')
-rw-r--r-- | usr.bin/rdistd/server.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/rdistd/server.c b/usr.bin/rdistd/server.c index f1f6a8794ca..47d47eb5128 100644 --- a/usr.bin/rdistd/server.c +++ b/usr.bin/rdistd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.32 2014/07/12 03:02:27 guenther Exp $ */ +/* $OpenBSD: server.c,v 1.33 2014/07/12 03:10:03 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -94,7 +94,7 @@ cattarget(char *string) * Set uid and gid ownership of a file. */ static int -setownership(char *file, int fd, uid_t uid, gid_t gid, int link) +setownership(char *file, int fd, uid_t uid, gid_t gid, int islink) { int status = -1; @@ -104,13 +104,13 @@ setownership(char *file, int fd, uid_t uid, gid_t gid, int link) if (getuid() != 0) uid = -1; - if (link) + if (islink) status = lchown(file, uid, gid); - if (fd != -1 && !link) + if (fd != -1 && !islink) status = fchown(fd, uid, gid); - if (status < 0 && !link) + if (status < 0 && !islink) status = chown(file, uid, gid); if (status < 0) { @@ -130,20 +130,20 @@ setownership(char *file, int fd, uid_t uid, gid_t gid, int link) * Set mode of a file */ static int -setfilemode(char *file, int fd, int mode, int link) +setfilemode(char *file, int fd, int mode, int islink) { int status = -1; if (mode == -1) return(0); - if (link) + if (islink) status = fchmodat(AT_FDCWD, file, mode, AT_SYMLINK_NOFOLLOW); - if (fd != -1 && !link) + if (fd != -1 && !islink) status = fchmod(fd, mode); - if (status < 0 && !link) + if (status < 0 && !islink) status = chmod(file, mode); if (status < 0) { |