PERFORCE change 83800 for review

Christian S.J. Peron csjp at FreeBSD.org
Sat Sep 17 23:17:19 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=83800

Change 83800 by csjp at csjp_xor on 2005/09/17 23:17:03

	Print a warning if a dependency is not accessible for any reason.

Affected files ...

.. //depot/projects/trustedbsd/mac/usr.sbin/getfhash/getfhash.c#14 edit

Differences ...

==== //depot/projects/trustedbsd/mac/usr.sbin/getfhash/getfhash.c#14 (text+ko) ====

@@ -178,6 +178,7 @@
 static void
 set_hash(const char *pathname)
 {
+	struct stat sb;
 	int error;
 	size_t slen;
 
@@ -194,6 +195,8 @@
 	}
 	if (!mflag)
 		return;
+	if (stat(mflag, &sb) < 0)
+		fprintf(stderr, "WARNING: %s: %s\n", mflag, strerror(errno));
 	slen = strlen(mflag);
 	error = extattr_set_file(pathname, MAC_CHKEXEC_ATTRN,
 	    MAC_CHKEXEC_DEP, mflag, slen);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list