]> git.saurik.com Git - apple/ipsec.git/blobdiff - ipsec-tools/racoon/safefile.c
ipsec-258.1.3.tar.gz
[apple/ipsec.git] / ipsec-tools / racoon / safefile.c
index b698fa765c3540bfcb4a6ef5a3bcf4f9fcd2bfa8..fdeb26c358a28ded78bda9ae3697693bfad5faea 100644 (file)
@@ -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;
                }