From e912442e98904e4d3d77ac344f9a353688ca3e9f Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 5 Dec 2009 19:04:21 +0000 Subject: Don't let the C library depend on . The maximum length of a username has nothing to do with the size of the username in the utmp files. Use MAXLOGNAME, which is defined as 17 (UT_USERSIZE + 1). --- lib/libc/posix1e/acl_to_text.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/libc/posix1e') diff --git a/lib/libc/posix1e/acl_to_text.c b/lib/libc/posix1e/acl_to_text.c index 79a950a..e5fd1f7 100644 --- a/lib/libc/posix1e/acl_to_text.c +++ b/lib/libc/posix1e/acl_to_text.c @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "acl_support.h" @@ -58,7 +57,7 @@ _posix1e_acl_to_text(acl_t acl, ssize_t *len_p, int flags) { struct acl *acl_int; char *buf, *tmpbuf; - char name_buf[UT_NAMESIZE+1]; + char name_buf[MAXLOGNAME]; char perm_buf[_POSIX1E_ACL_STRING_PERM_MAXSIZE+1], effective_perm_buf[_POSIX1E_ACL_STRING_PERM_MAXSIZE+1]; int i, error, len; @@ -103,7 +102,7 @@ _posix1e_acl_to_text(acl_t acl, ssize_t *len_p, int flags) goto error_label; error = _posix1e_acl_id_to_name(ae_tag, ae_id, - UT_NAMESIZE+1, name_buf, flags); + MAXLOGNAME, name_buf, flags); if (error) goto error_label; @@ -163,7 +162,7 @@ _posix1e_acl_to_text(acl_t acl, ssize_t *len_p, int flags) goto error_label; error = _posix1e_acl_id_to_name(ae_tag, ae_id, - UT_NAMESIZE+1, name_buf, flags); + MAXLOGNAME, name_buf, flags); if (error) goto error_label; -- cgit v1.1