projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
write => tty
[unix-history]
/
usr
/
src
/
usr.bin
/
login
/
login.c
diff --git
a/usr/src/usr.bin/login/login.c
b/usr/src/usr.bin/login/login.c
index
d8e5a44
..
87b65d8
100644
(file)
--- a/
usr/src/usr.bin/login/login.c
+++ b/
usr/src/usr.bin/login/login.c
@@
-11,7
+11,7
@@
char copyright[] =
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)login.c 5.1
4
(Berkeley) %G%";
+static char sccsid[] = "@(#)login.c 5.1
5
(Berkeley) %G%";
#endif not lint
/*
#endif not lint
/*
@@
-38,8
+38,8
@@
static char sccsid[] = "@(#)login.c 5.14 (Berkeley) %G%";
#include <syslog.h>
#include <grp.h>
#include <syslog.h>
#include <grp.h>
-#define
WRITENAME "write"
/* name of group to own ttys */
-#define
WRITEGID(gid) write_gid(gid)
/* gid that owns all ttys */
+#define
TTYGRPNAME "tty"
/* name of group to own ttys */
+#define
TTYGID(gid) tty_gid(gid)
/* gid that owns all ttys */
#define SCMPN(a, b) strncmp(a, b, sizeof(a))
#define SCPYN(a, b) strncpy(a, b, sizeof(a))
#define SCMPN(a, b) strncmp(a, b, sizeof(a))
#define SCPYN(a, b) strncpy(a, b, sizeof(a))
@@
-328,7
+328,7
@@
main(argc, argv)
write(f, (char *) &ll, sizeof ll);
close(f);
}
write(f, (char *) &ll, sizeof ll);
close(f);
}
- chown(ttyn, pwd->pw_uid,
WRITE
GID(pwd->pw_gid));
+ chown(ttyn, pwd->pw_uid,
TTY
GID(pwd->pw_gid));
if (!hflag && !rflag) /* XXX */
ioctl(0, TIOCSWINSZ, &win);
chmod(ttyn, 0620);
if (!hflag && !rflag) /* XXX */
ioctl(0, TIOCSWINSZ, &win);
chmod(ttyn, 0620);
@@
-571,13
+571,13
@@
setenv(var, value, clobber)
environ[++index] = NULL;
}
environ[++index] = NULL;
}
-
write
_gid(default_gid)
+
tty
_gid(default_gid)
int default_gid;
{
struct group *getgrnam(), *gr;
int gid = default_gid;
int default_gid;
{
struct group *getgrnam(), *gr;
int gid = default_gid;
- gr = getgrnam(
WRITE
NAME);
+ gr = getgrnam(
TTYGRP
NAME);
if (gr != (struct group *) 0)
gid = gr->gr_gid;
if (gr != (struct group *) 0)
gid = gr->gr_gid;