Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/user Close masterfd after reading from it. Found by...
details: https://anonhg.NetBSD.org/src/rev/b1a138d884bd
branches: trunk
changeset: 760408:b1a138d884bd
user: wiz <wiz%NetBSD.org@localhost>
date: Tue Jan 04 10:30:21 2011 +0000
description:
Close masterfd after reading from it. Found by cppcheck.
diffstat:
usr.sbin/user/user.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r b3d39c3a474b -r b1a138d884bd usr.sbin/user/user.c
--- a/usr.sbin/user/user.c Tue Jan 04 10:26:56 2011 +0000
+++ b/usr.sbin/user/user.c Tue Jan 04 10:30:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.125 2009/12/31 19:59:31 mlelstv Exp $ */
+/* $NetBSD: user.c,v 1.126 2011/01/04 10:30:21 wiz Exp $ */
/*
* Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
@@ -33,7 +33,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1999\
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: user.c,v 1.125 2009/12/31 19:59:31 mlelstv Exp $");
+__RCSID("$NetBSD: user.c,v 1.126 2011/01/04 10:30:21 wiz Exp $");
#endif
#include <sys/types.h>
@@ -1115,6 +1115,7 @@
"short write to /etc/ptmp", login_name);
}
}
+ (void)close(masterfd);
/* if no uid was specified, get next one in [low_uid..high_uid] range */
sync_uid_gid = (strcmp(up->u_primgrp, "=uid") == 0);
if (up->u_uid == -1) {
Home |
Main Index |
Thread Index |
Old Index