Date: Fri, 18 Oct 2002 10:08:06 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 19550 for review Message-ID: <200210181708.g9IH86Nb063568@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=19550 Change 19550 by rwatson@rwatson_tislabs on 2002/10/18 10:07:42 Minor cleanup: <= instead of <, remember to free the context, etc. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/sebsd/sebsd.c#44 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/sebsd/sebsd.c#44 (text+ko) ==== @@ -1061,19 +1061,18 @@ (*claimed)++; - error = security_sid_to_context(sid, &context, - &context_len); + error = security_sid_to_context(sid, &context, &context_len); if (error) return (error); - if (size < context_len) - return (EINVAL); - - *len = strlcpy(element_data, context, size); - if (*len <= size) - return (EINVAL); - - return (0); + if (size <= context_len) { + error = EINVAL; + else { + *len = strlcpy(element_data, context, size); + error = 0; + } + security_free_context(context); + return (error); } static int To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210181708.g9IH86Nb063568>