From 52ee0dacfac37f1543ad0c6f3a4b21a9d5f766ad Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 8 Apr 2011 09:06:53 -0400 Subject: 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. --- duser.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'duser.h') diff --git a/duser.h b/duser.h index e53f940..e5b305f 100644 --- a/duser.h +++ b/duser.h @@ -1,11 +1,6 @@ #ifndef DUSER_H #define DUSER_H - -#ifndef HAVE_STRCHRNUL -# define strchrnul(s, c) dstrchrnul(s, c) -#endif - #include #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 -- cgit