Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/getty Don't chown/unlink uninitialized lockfile if n...
details: https://anonhg.NetBSD.org/src/rev/395f247338c1
branches: trunk
changeset: 584181:395f247338c1
user: elad <elad%NetBSD.org@localhost>
date: Sat Sep 10 21:29:36 2005 +0000
description:
Don't chown/unlink uninitialized lockfile if not uugetty.
>From Dr. Wolfgang Stukenbrock, PR/31040.
diffstat:
libexec/getty/main.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r a6c847e9e415 -r 395f247338c1 libexec/getty/main.c
--- a/libexec/getty/main.c Sat Sep 10 21:14:18 2005 +0000
+++ b/libexec/getty/main.c Sat Sep 10 21:29:36 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.48 2005/06/01 15:50:00 lukem Exp $ */
+/* $NetBSD: main.c,v 1.49 2005/09/10 21:29:36 elad Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";
#else
-__RCSID("$NetBSD: main.c,v 1.48 2005/06/01 15:50:00 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.49 2005/09/10 21:29:36 elad Exp $");
#endif
#endif /* not lint */
@@ -276,7 +276,8 @@
syslog(LOG_ERR, "%s: can't create lockfile", ttyn);
exit(1);
}
- (void) chown(lockfile, ttyowner, 0);
+ if (uugetty)
+ (void) chown(lockfile, ttyowner, 0);
login_tty(i);
}
}
@@ -434,7 +435,8 @@
signal(SIGINT, SIG_IGN);
if (NX && *NX)
tname = NX;
- unlink(lockfile);
+ if (uugetty)
+ unlink(lockfile);
}
}
Home |
Main Index |
Thread Index |
Old Index