summaryrefslogtreecommitdiffstats
path: root/libutil/_secure_path.c
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2003-10-18 10:04:16 +0000
committerMark Murray <markm@FreeBSD.org>2003-10-18 10:04:16 +0000
commit1bb634ce247e398483c157e44c4bd8d2cef73dd0 (patch)
tree2dc8cb8c5a0f6b219c8df70f498efe1353caec6b /libutil/_secure_path.c
parent24078af1d1886060d75aa6da90eaaee07138f5ff (diff)
downloadpw-darwin-1bb634ce247e398483c157e44c4bd8d2cef73dd0.tar.gz
pw-darwin-1bb634ce247e398483c157e44c4bd8d2cef73dd0.tar.zst
pw-darwin-1bb634ce247e398483c157e44c4bd8d2cef73dd0.zip
ANSIfy, WARNSify, CONSTify. Bit of style(9)-ify.
Diffstat (limited to 'libutil/_secure_path.c')
-rw-r--r--libutil/_secure_path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libutil/_secure_path.c b/libutil/_secure_path.c
index 550a092..0411080 100644
--- a/libutil/_secure_path.c
+++ b/libutil/_secure_path.c
@@ -59,12 +59,12 @@ _secure_path(const char *path, uid_t uid, gid_t gid)
msg = "%s: %s is not a regular file";
else if (sb.st_mode & S_IWOTH)
msg = "%s: %s is world writable";
- else if (uid != -1 && sb.st_uid != uid && sb.st_uid != 0) {
+ else if ((int)uid != -1 && sb.st_uid != uid && sb.st_uid != 0) {
if (uid == 0)
msg = "%s: %s is not owned by root";
else
msg = "%s: %s is not owned by uid %d";
- } else if (gid != -1 && sb.st_gid != gid && (sb.st_mode & S_IWGRP))
+ } else if ((int)gid != -1 && sb.st_gid != gid && (sb.st_mode & S_IWGRP))
msg = "%s: %s is group writeable by non-authorised groups";
else
r = 0;