Changes in trunk/src/sh_socket.c [1:22]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_socket.c
r1 r22 244 244 } 245 245 246 int sh_socket_use (c har * c)246 int sh_socket_use (const char * c) 247 247 { 248 248 return sh_util_flagval(c, &sh_socket_flaguse); … … 289 289 #endif 290 290 291 int sh_socket_uid (c har * c)291 int sh_socket_uid (const char * c) 292 292 { 293 293 uid_t val = (uid_t) strtol (c, (char **)NULL, 10); … … 301 301 } 302 302 303 int sh_socket_password (c har * c)303 int sh_socket_password (const char * c) 304 304 { 305 305 #if defined(NEED_PASSWORD_AUTH) … … 378 378 379 379 name.sun_family = AF_FILE; 380 s trcpy (name.sun_path, sh_sockname);380 sl_strlcpy (name.sun_path, sh_sockname, sizeof(name.sun_path)); 381 381 382 382 size = (offsetof (struct sockaddr_un, sun_path) … … 878 878 879 879 new = SH_ALLOC(sizeof(struct socket_cmd)); 880 s trcpy (new->cmd, in->cmd);881 s trcpy (new->clt, in->clt);882 s trcpy (new->cti, sh_unix_time(0));880 sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd)); 881 sl_strlcpy (new->clt, in->clt, sizeof(new->clt)); 882 sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti)); 883 883 new->next = cmdlist; 884 884 cmdlist = new; … … 896 896 if (0 == sl_strcmp(new->clt, client_name)) 897 897 { 898 s trcpy (new->cmd, in->cmd);899 s trcpy (new->clt, in->clt);900 s trcpy (new->cti, sh_unix_time(0));898 sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd)); 899 sl_strlcpy (new->clt, in->clt, sizeof(new->clt)); 900 sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti)); 901 901 return; 902 902 } … … 905 905 906 906 new = SH_ALLOC(sizeof(struct socket_cmd)); 907 s trcpy (new->cmd, in->cmd);908 s trcpy (new->clt, in->clt);909 s trcpy (new->cti, sh_unix_time(0));907 sl_strlcpy (new->cmd, in->cmd, sizeof(new->cmd)); 908 sl_strlcpy (new->clt, in->clt, sizeof(new->clt)); 909 sl_strlcpy (new->cti, sh_unix_time(0), sizeof(new->cti)); 910 910 new->next = runlist; 911 911 runlist = new;
Note:
See TracChangeset
for help on using the changeset viewer.