diff options
author | Joseph Hunkeler <jhunk@stsci.edu> | 2011-04-08 09:06:53 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunk@stsci.edu> | 2012-05-25 14:20:34 -0400 |
commit | abd3feecace1497baacb6c9fad9c70831f1c1d05 (patch) | |
tree | 831e4e44218ded605e22551bafc6212adc492f36 /duser.h | |
parent | 8bd095e7fe28f383f82f0e0663f0db6bafce3fa8 (diff) | |
download | duser-abd3feecace1497baacb6c9fad9c70831f1c1d05.tar.gz |
Fixed Solaris 10 segfault. If list_path was null, snprintf would write bad data into the filename. While loop in user_cmd() was removed because it was never used as intended.
Diffstat (limited to 'duser.h')
-rw-r--r-- | duser.h | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,11 +1,6 @@ #ifndef DUSER_H #define DUSER_H - -#ifndef HAVE_STRCHRNUL -# define strchrnul(s, c) dstrchrnul(s, c) -#endif - #include <limits.h> #define REGEX_MAX 255 #define CFG_PATH "/usr/local/etc/duser" @@ -50,6 +45,9 @@ int user_cmd(const int argc, char* argv[]); int user_choice(char c); int user_add(const char* filename, const char* needle); int user_new_list(const char* fname); -char *dstrchrnul(const char* s, int c); +#ifdef _NLINUX_ +char *strcasestr(const char *s, const char *find); +char *strchrnul(const char* s, int c); +#endif #endif |