diff options
author | markm <markm@FreeBSD.org> | 2000-01-09 08:31:47 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-01-09 08:31:47 +0000 |
commit | ca616c603d9e06e51c9e23fab7536acbdac58331 (patch) | |
tree | 20a735799ecd3b90df122d0a8042762dd62c6b0e /crypto/kerberosIV/appl/bsd/login_fbtab.c | |
parent | fe83e8abf357ee11114856a5278bb38431a9517c (diff) | |
download | FreeBSD-src-ca616c603d9e06e51c9e23fab7536acbdac58331.zip FreeBSD-src-ca616c603d9e06e51c9e23fab7536acbdac58331.tar.gz |
Clean import of KTH Kerberos (eBones) v1.0.
Diffstat (limited to 'crypto/kerberosIV/appl/bsd/login_fbtab.c')
-rw-r--r-- | crypto/kerberosIV/appl/bsd/login_fbtab.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/kerberosIV/appl/bsd/login_fbtab.c b/crypto/kerberosIV/appl/bsd/login_fbtab.c index f831909..3aa5e4c 100644 --- a/crypto/kerberosIV/appl/bsd/login_fbtab.c +++ b/crypto/kerberosIV/appl/bsd/login_fbtab.c @@ -58,7 +58,7 @@ #include "bsd_locl.h" -RCSID("$Id: login_fbtab.c,v 1.13 1999/01/14 00:37:59 assar Exp $"); +RCSID("$Id: login_fbtab.c,v 1.14 1999/09/16 20:37:24 assar Exp $"); void login_protect (char *, char *, int, uid_t, gid_t); void login_fbtab (char *tty, uid_t uid, gid_t gid); @@ -126,7 +126,7 @@ login_protect(char *table, char *path, int mask, uid_t uid, gid_t gid) if (chown(path, uid, gid) && errno != ENOENT) syslog(LOG_ERR, "%s: chown(%s): %m", table, path); } else { - strcpy_truncate (buf, path, sizeof(buf)); + strlcpy (buf, path, sizeof(buf)); if (sizeof(buf) > pathlen) buf[pathlen - 2] = '\0'; /* Solaris evidently operates on the directory as well */ @@ -142,7 +142,7 @@ login_protect(char *table, char *path, int mask, uid_t uid, gid_t gid) while ((ent = readdir(dir)) != 0) { if (strcmp(ent->d_name, ".") != 0 && strcmp(ent->d_name, "..") != 0) { - strcpy_truncate (buf + pathlen - 1, + strlcpy (buf + pathlen - 1, ent->d_name, sizeof(buf) - (pathlen + 1)); login_protect(table, buf, mask, uid, gid); |