X-Git-Url: https://git.saurik.com/apple/ipsec.git/blobdiff_plain/52b7d2ce06d68d0a9160d16f6e7c08c21c149d0d..65c257469f746e64364e5df94f3ed8c6698a9d0a:/ipsec-tools/racoon/safefile.c diff --git a/ipsec-tools/racoon/safefile.c b/ipsec-tools/racoon/safefile.c index b698fa7..fdeb26c 100644 --- a/ipsec-tools/racoon/safefile.c +++ b/ipsec-tools/racoon/safefile.c @@ -1,3 +1,5 @@ +/* $NetBSD: safefile.c,v 1.4 2006/09/09 16:22:10 manu Exp $ */ + /* $KAME: safefile.c,v 1.5 2001/03/05 19:54:06 thorpej Exp $ */ /* @@ -52,7 +54,7 @@ safefile(path, secret) /* no setuid */ if (getuid() != geteuid()) { - plog(LLV_ERROR, LOCATION, NULL, + plog(ASL_LEVEL_ERR, "setuid'ed execution not allowed\n"); return -1; } @@ -63,7 +65,7 @@ safefile(path, secret) /* the file must be owned by the running uid */ me = getuid(); if (s.st_uid != me) { - plog(LLV_ERROR, LOCATION, NULL, + plog(ASL_LEVEL_ERR, "%s has invalid owner uid\n", path); return -1; } @@ -72,7 +74,7 @@ safefile(path, secret) case S_IFREG: break; default: - plog(LLV_ERROR, LOCATION, NULL, + plog(ASL_LEVEL_ERR, "%s is an invalid file type 0x%x\n", path, (s.st_mode & S_IFMT)); return -1; @@ -81,7 +83,7 @@ safefile(path, secret) /* secret file should not be read by others */ if (secret) { if ((s.st_mode & S_IRWXG) != 0 || (s.st_mode & S_IRWXO) != 0) { - plog(LLV_ERROR, LOCATION, NULL, + plog(ASL_LEVEL_ERR, "%s has weak file permission\n", path); return -1; }