summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorEivind Eklund <eivind@FreeBSD.org>1997-10-18 20:58:48 +0000
committerEivind Eklund <eivind@FreeBSD.org>1997-10-18 20:58:48 +0000
commit9fca4e6198c00d295e8f20e7177a03e89d6b68da (patch)
tree0f6b619c00b94ea1a06e8af6ffb77149ce6a8e3d /libexec
parent57e93dac9f8f2289d25625d15ec24a676f2873dc (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/uucpd/uucpd.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c
index 0c9feb2ff491..bc3d4e7621b6 100644
--- a/libexec/uucpd/uucpd.c
+++ b/libexec/uucpd/uucpd.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: uucpd.c,v 1.7.2.1 1997/04/01 20:41:55 joerg Exp $
*/
#ifndef lint
@@ -55,7 +55,6 @@ static char sccsid[] = "@(#)uucpd.c 8.1 (Berkeley) 6/4/93";
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
@@ -70,8 +69,15 @@ static char sccsid[] = "@(#)uucpd.c 8.1 (Berkeley) 6/4/93";
#include <string.h>
#include <utmp.h>
#include <syslog.h>
+#include <sys/param.h>
#include "pathnames.h"
+#if (MAXLOGNAME-1) > UT_NAMESIZE
+#define LOGNAMESIZE UT_NAMESIZE
+#else
+#define LOGNAMESIZE (MAXLOGNAME-1)
+#endif
+
#define SCPYN(a, b) strncpy(a, b, sizeof (a))
struct sockaddr_in hisctladdr;
@@ -157,8 +163,8 @@ void doit(struct sockaddr_in *sinp)
syslog(LOG_WARNING, "login read: %m");
_exit(1);
}
- /* truncate username to 8 characters */
- user[8] = '\0';
+ /* truncate username to LOGNAMESIZE characters */
+ user[LOGNAMESIZE] = '\0';
pw = getpwnam(user);
if (pw == NULL)
login_incorrect(user, sinp);