Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2010 15:26:15 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r209047 - stable/8/lib/libc/posix1e
Message-ID:  <201006111526.o5BFQFN8014013@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Fri Jun 11 15:26:15 2010
New Revision: 209047
URL: http://svn.freebsd.org/changeset/base/209047

Log:
  MFC r208811:
  
  Don't use pointer to 64 bit value (id_t) to point to 32 bit value (uid_t).
  
  Found with:	Coverity Prevent
  CID:		7466, 7467
  Approved by:	re (kib)

Modified:
  stable/8/lib/libc/posix1e/acl_to_text_nfs4.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/posix1e/acl_to_text_nfs4.c
==============================================================================
--- stable/8/lib/libc/posix1e/acl_to_text_nfs4.c	Fri Jun 11 15:21:12 2010	(r209046)
+++ stable/8/lib/libc/posix1e/acl_to_text_nfs4.c	Fri Jun 11 15:26:15 2010	(r209047)
@@ -50,7 +50,7 @@ format_who(char *str, size_t size, const
 	acl_tag_t tag;
 	struct passwd *pwd;
 	struct group *grp;
-	id_t *id;
+	uid_t *id;
 
 	error = acl_get_tag_type(entry, &tag);
 	if (error)
@@ -62,7 +62,7 @@ format_who(char *str, size_t size, const
 		break;
 
 	case ACL_USER:
-		id = (id_t *)acl_get_qualifier(entry);
+		id = (uid_t *)acl_get_qualifier(entry);
 		if (id == NULL)
 			return (-1);
 		/* XXX: Thread-unsafe. */
@@ -81,7 +81,7 @@ format_who(char *str, size_t size, const
 		break;
 
 	case ACL_GROUP:
-		id = (id_t *)acl_get_qualifier(entry);
+		id = (uid_t *)acl_get_qualifier(entry);
 		if (id == NULL)
 			return (-1);
 		/* XXX: Thread-unsafe. */
@@ -141,7 +141,7 @@ format_additional_id(char *str, size_t s
 {
 	int error;
 	acl_tag_t tag;
-	id_t *id;
+	uid_t *id;
 
 	error = acl_get_tag_type(entry, &tag);
 	if (error)
@@ -155,7 +155,7 @@ format_additional_id(char *str, size_t s
 		break;
 
 	default:
-		id = (id_t *)acl_get_qualifier(entry);
+		id = (uid_t *)acl_get_qualifier(entry);
 		if (id == NULL)
 			return (-1);
 		snprintf(str, size, ":%d", (unsigned int)*id);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006111526.o5BFQFN8014013>