summaryrefslogtreecommitdiffstats
path: root/crypto/kerberosIV/appl/bsd/login_fbtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/kerberosIV/appl/bsd/login_fbtab.c')
-rw-r--r--crypto/kerberosIV/appl/bsd/login_fbtab.c6
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);
OpenPOWER on IntegriCloud