summaryrefslogtreecommitdiffstats
path: root/crypto/kerberosIV/appl/bsd/rshd.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-01-09 08:31:47 +0000
committermarkm <markm@FreeBSD.org>2000-01-09 08:31:47 +0000
commit6ae78a53894ebd0e7fee2629853a8646eda38887 (patch)
treed8fa5ae90ea14f0d939383153fc5a1e978bc3127 /crypto/kerberosIV/appl/bsd/rshd.c
parent2d96e5dd45a8fbdead16d7a6a28dab5a13054a6c (diff)
parentca616c603d9e06e51c9e23fab7536acbdac58331 (diff)
downloadFreeBSD-src-6ae78a53894ebd0e7fee2629853a8646eda38887.zip
FreeBSD-src-6ae78a53894ebd0e7fee2629853a8646eda38887.tar.gz
This commit was generated by cvs2svn to compensate for changes in r55643,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/kerberosIV/appl/bsd/rshd.c')
-rw-r--r--crypto/kerberosIV/appl/bsd/rshd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/kerberosIV/appl/bsd/rshd.c b/crypto/kerberosIV/appl/bsd/rshd.c
index 1a30793..ed91feb 100644
--- a/crypto/kerberosIV/appl/bsd/rshd.c
+++ b/crypto/kerberosIV/appl/bsd/rshd.c
@@ -42,7 +42,7 @@
#include "bsd_locl.h"
-RCSID("$Id: rshd.c,v 1.58 1999/06/17 18:49:43 assar Exp $");
+RCSID("$Id: rshd.c,v 1.60 1999/11/13 06:13:53 assar Exp $");
extern char *__rcmd_errstr; /* syslog hook from libc/net/rcmd.c. */
extern int __check_rhosts_file;
@@ -82,7 +82,7 @@ main(int argc, char *argv[])
openlog("rshd", LOG_PID | LOG_ODELAY, LOG_DAEMON);
opterr = 0;
- while ((ch = getopt(argc, argv, OPTIONS)) != EOF)
+ while ((ch = getopt(argc, argv, OPTIONS)) != -1)
switch (ch) {
case 'a':
break;
@@ -565,13 +565,13 @@ doit(struct sockaddr_in *fromp)
setgid((gid_t)pwd->pw_gid);
initgroups(pwd->pw_name, pwd->pw_gid);
setuid((uid_t)pwd->pw_uid);
- strcat_truncate(homedir, pwd->pw_dir, sizeof(homedir));
+ strlcat(homedir, pwd->pw_dir, sizeof(homedir));
/* Need to prepend path with BINDIR (/usr/athena/bin) to find rcp */
snprintf(path, sizeof(path), "PATH=%s:%s", BINDIR, _PATH_DEFPATH);
- strcat_truncate(shell, pwd->pw_shell, sizeof(shell));
- strcat_truncate(username, pwd->pw_name, sizeof(username));
+ strlcat(shell, pwd->pw_shell, sizeof(shell));
+ strlcat(username, pwd->pw_name, sizeof(username));
cp = strrchr(pwd->pw_shell, '/');
if (cp)
cp++;
OpenPOWER on IntegriCloud