aboutsummaryrefslogtreecommitdiff
path: root/networking/isrv_identd.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/isrv_identd.c')
-rw-r--r--networking/isrv_identd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c
index 252c8aba9..f63ed8ee4 100644
--- a/networking/isrv_identd.c
+++ b/networking/isrv_identd.c
@@ -18,6 +18,7 @@
18//usage: "\n STRING Ident answer string (default: nobody)" 18//usage: "\n STRING Ident answer string (default: nobody)"
19 19
20#include "libbb.h" 20#include "libbb.h"
21#include "common_bufsiz.h"
21#include <syslog.h> 22#include <syslog.h>
22#include "isrv.h" 23#include "isrv.h"
23 24
@@ -28,7 +29,8 @@ typedef struct identd_buf_t {
28 char buf[64 - sizeof(int)]; 29 char buf[64 - sizeof(int)];
29} identd_buf_t; 30} identd_buf_t;
30 31
31#define bogouser bb_common_bufsiz1 32#define bogouser bb_common_bufsiz1
33#define sizeof_bogouser COMMON_BUFSIZE
32 34
33static int new_peer(isrv_state_t *state, int fd) 35static int new_peer(isrv_state_t *state, int fd)
34{ 36{
@@ -118,7 +120,7 @@ int fakeidentd_main(int argc UNUSED_PARAM, char **argv)
118 opt = getopt32(argv, "fiwb:", &bind_address); 120 opt = getopt32(argv, "fiwb:", &bind_address);
119 strcpy(bogouser, "nobody"); 121 strcpy(bogouser, "nobody");
120 if (argv[optind]) 122 if (argv[optind])
121 strncpy(bogouser, argv[optind], sizeof(bogouser) - 1); 123 strncpy(bogouser, argv[optind], sizeof_bogouser - 1);
122 124
123 /* Daemonize if no -f and no -i and no -w */ 125 /* Daemonize if no -f and no -i and no -w */
124 if (!(opt & OPT_fiw)) 126 if (!(opt & OPT_fiw))