svn rev #3317: branches/krb5-appl-1-0/bsd/
ghudson@MIT.EDU
ghudson at MIT.EDU
Mon Jul 11 15:31:31 EDT 2011
Commit By: ghudson
Log Message:
Pull up r3308 from trunk.
------------------------------------------------------------------------
r3308 | ghudson | 2010-09-13 19:16:05 -0400 (Mon, 13 Sep 2010) | 3 lines
From nalin at redhat.com: Allow username lengths up to the system's value
of UT_NAMESIZE.
Changed Files:
U branches/krb5-appl-1-0/bsd/krshd.c
Modified: branches/krb5-appl-1-0/bsd/krshd.c
===================================================================
--- branches/krb5-appl-1-0/bsd/krshd.c 2011-07-11 19:30:55 UTC (rev 3316)
+++ branches/krb5-appl-1-0/bsd/krshd.c 2011-07-11 19:31:31 UTC (rev 3317)
@@ -171,7 +171,14 @@
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifndef UT_NAMESIZE /* linux defines it directly in <utmp.h> */
+#define UT_NAMESIZE sizeof(((struct utmp *)0)->ut_name)
+#endif
+
#define MAXRETRIES 4
krb5_context bsd_context;
@@ -438,7 +445,7 @@
#include <tmpdir.h>
char tmpdir[64] = "TMPDIR=";
#else
-char username[20] = "USER=";
+char username[UT_NAMESIZE + 6] = "USER=";
#endif
char homedir[64] = "HOME=";
@@ -493,7 +500,7 @@
#define NCARGS 4096
#endif
-#define NMAX 16
+#define NMAX UT_NAMESIZE
int pid;
char locuser[NMAX+1];
More information about the Krb5-appl-commits
mailing list