Remove all flags from devices before we try to assert ownership and
set permissions. Bug not fixed: We silently ignore failures of chflags, chmod and chown.
This commit is contained in:
parent
d1f4b00143
commit
20c94656c5
@ -42,7 +42,7 @@ static const char copyright[] =
|
|||||||
static const char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93";
|
static const char sccsid[] = "@(#)rlogind.c 8.1 (Berkeley) 6/4/93";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: rlogind.c,v 1.22 1999/04/07 08:27:42 brian Exp $";
|
"$Id: rlogind.c,v 1.23 1999/04/25 22:23:37 imp Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -549,9 +549,11 @@ cleanup(signo)
|
|||||||
p = line + sizeof(_PATH_DEV) - 1;
|
p = line + sizeof(_PATH_DEV) - 1;
|
||||||
if (logout(p))
|
if (logout(p))
|
||||||
logwtmp(p, "", "");
|
logwtmp(p, "", "");
|
||||||
|
(void)cflags(line, 0);
|
||||||
(void)chmod(line, 0666);
|
(void)chmod(line, 0666);
|
||||||
(void)chown(line, 0, 0);
|
(void)chown(line, 0, 0);
|
||||||
*p = 'p';
|
*p = 'p';
|
||||||
|
(void)cflags(line, 0);
|
||||||
(void)chmod(line, 0666);
|
(void)chmod(line, 0666);
|
||||||
(void)chown(line, 0, 0);
|
(void)chown(line, 0, 0);
|
||||||
shutdown(netf, 2);
|
shutdown(netf, 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user