PERFORCE change 107563 for review

Todd Miller millert at FreeBSD.org
Mon Oct 9 12:33:44 PDT 2006


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

Change 107563 by millert at millert_g5tower on 2006/10/09 19:32:51

	Must initialize buf_len before call to sysctlbyname().

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/canonicalize_context.c#3 edit
.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/check_context.c#3 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/canonicalize_context.c#3 (text+ko) ====

@@ -16,6 +16,7 @@
         ssize_t con_len;
 	int ret = -1;
 
+	buf_len = sizeof(buf);
 	con_len = strlen(con) + 1;
         ret = sysctlbyname("security.mac.sebsd.canon_context", buf,
             &buf_len, con, con_len);

==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/check_context.c#3 (text+ko) ====

@@ -16,6 +16,7 @@
 	int ret;
 
 	/* Just check validity, don't care about returned buffer. */
+	buf_len = sizeof(buf);
 	con_len = strlen(con) + 1;
         ret = sysctlbyname("security.mac.sebsd.canon_context", buf,
             &buf_len, con, con_len);


More information about the trustedbsd-cvs mailing list