From owner-p4-projects@FreeBSD.ORG Wed Nov 30 23:57:45 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 57DE216A422; Wed, 30 Nov 2005 23:57:45 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0442B16A41F for ; Wed, 30 Nov 2005 23:57:45 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E4E443D68 for ; Wed, 30 Nov 2005 23:57:44 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jAUNviKx080255 for ; Wed, 30 Nov 2005 23:57:44 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jAUNvhm7080252 for perforce@freebsd.org; Wed, 30 Nov 2005 23:57:43 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 30 Nov 2005 23:57:43 GMT Message-Id: <200511302357.jAUNvhm7080252@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 87554 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2005 23:57:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=87554 Change 87554 by rwatson@rwatson_peppercorn on 2005/11/30 23:57:14 Annotate a case of non-atomicity in the BSM flags code, where there is a potential race with another thread in similar code. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_flags.c#7 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_flags.c#7 (text+ko) ==== @@ -97,6 +97,11 @@ * * XXXRW: If bits are specified that are not matched by any class, they are * omitted rather than rejected with EINVAL. + * + * XXXRW: This is not thread-safe as it relies on atomicity between + * setauclass() and sequential calls to getauclassent(). This could be + * fixed by iterating through the bitmask fields rather than iterating + * through the classes. */ int getauditflagschar(char *auditstr, au_mask_t *masks, int verbose)