diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-22 16:10:39 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-22 16:10:39 +0000 |
commit | c8717cd8571cd35d71696aab8aa847169756bd9f (patch) | |
tree | 254a736d3e761bddc4ba4b00a8f6af1d430ad18f /networking/fakeidentd.c | |
parent | 0801ef28ca655a28543b28754fd804ba0616c21c (diff) |
telnetd: move generic stuff into libbb. It will make it easy
to make other server applets IPv6-aware too.
Diffstat (limited to 'networking/fakeidentd.c')
-rw-r--r-- | networking/fakeidentd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c index 18e86c50b..0e543e772 100644 --- a/networking/fakeidentd.c +++ b/networking/fakeidentd.c @@ -110,13 +110,13 @@ static void handlexitsigs(int signum) /* May succeed. If not, won't care. */ static void writepid(uid_t nobody, uid_t nogrp) { - char buf[24]; + char buf[sizeof(int)*3 + 2]; int fd = open(PIDFILE, O_WRONLY|O_CREAT|O_TRUNC, 0664); if (fd < 0) return; - snprintf(buf, 23, "%d\n", getpid()); + sprintf(buf, "%d\n", getpid()); write(fd, buf, strlen(buf)); fchown(fd, nobody, nogrp); close(fd); |