diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-08-18 18:31:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-08-18 18:31:22 +0000 |
commit | aa5ec6e986b2282d373774bb1dfbc0d8d4bd2b6f (patch) | |
tree | f0cfddb8baa8a94c8ddcc4e24b32cfd363e85775 /libexec/rpc.rusersd | |
parent | f635e5aa9e03108817900699c84263901777bd52 (diff) |
strlcpy invades the tree
Diffstat (limited to 'libexec/rpc.rusersd')
-rw-r--r-- | libexec/rpc.rusersd/rusers_proc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c index 820d08a7ef4..d272488836a 100644 --- a/libexec/rpc.rusersd/rusers_proc.c +++ b/libexec/rpc.rusersd/rusers_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rusers_proc.c,v 1.9 2001/07/08 21:18:10 deraadt Exp $ */ +/* $OpenBSD: rusers_proc.c,v 1.10 2001/08/18 18:31:21 deraadt Exp $ */ /*- * Copyright (c) 1993 John Brezak @@ -29,7 +29,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: rusers_proc.c,v 1.9 2001/07/08 21:18:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rusers_proc.c,v 1.10 2001/08/18 18:31:21 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -251,11 +251,11 @@ do_names_3(int all) utmps[nusers].ut_idle = getidle(usr.ut_line, usr.ut_host); utmps[nusers].ut_line = line[nusers]; - strncpy(line[nusers], usr.ut_line, sizeof(line[nusers])); + strlcpy(line[nusers], usr.ut_line, sizeof(line[nusers])); utmps[nusers].ut_user = name[nusers]; - strncpy(name[nusers], usr.ut_name, sizeof(name[nusers])); + strlcpy(name[nusers], usr.ut_name, sizeof(name[nusers])); utmps[nusers].ut_host = host[nusers]; - strncpy(host[nusers], usr.ut_host, sizeof(host[nusers])); + strlcpy(host[nusers], usr.ut_host, sizeof(host[nusers])); nusers++; } ut.utmp_array_len = nusers; @@ -313,11 +313,11 @@ do_names_2(int all) utmp_idle[nusers].ui_idle = getidle(usr.ut_line, usr.ut_host); utmp_idle[nusers].ui_utmp.ut_line = line[nusers]; - strncpy(line[nusers], usr.ut_line, sizeof(line[nusers])); + strlcpy(line[nusers], usr.ut_line, sizeof(line[nusers])); utmp_idle[nusers].ui_utmp.ut_name = name[nusers]; - strncpy(name[nusers], usr.ut_name, sizeof(name[nusers])); + strlcpy(name[nusers], usr.ut_name, sizeof(name[nusers])); utmp_idle[nusers].ui_utmp.ut_host = host[nusers]; - strncpy(host[nusers], usr.ut_host, sizeof(host[nusers])); + strlcpy(host[nusers], usr.ut_host, sizeof(host[nusers])); nusers++; } @@ -372,11 +372,11 @@ do_names_1(int all) ru_utmpp[nusers] = &ru_utmp[nusers]; ru_utmp[nusers].ut_time = usr.ut_time; ru_utmp[nusers].ut_line = line[nusers]; - strncpy(line[nusers], usr.ut_line, sizeof(line[nusers])); + strlcpy(line[nusers], usr.ut_line, sizeof(line[nusers])); ru_utmp[nusers].ut_name = name[nusers]; - strncpy(name[nusers], usr.ut_name, sizeof(name[nusers])); + strlcpy(name[nusers], usr.ut_name, sizeof(name[nusers])); ru_utmp[nusers].ut_host = host[nusers]; - strncpy(host[nusers], usr.ut_host, sizeof(host[nusers])); + strlcpy(host[nusers], usr.ut_host, sizeof(host[nusers])); nusers++; } |