Changeset 132 for trunk/include
- Timestamp:
- Oct 23, 2007, 11:44:41 PM (17 years ago)
- Location:
- trunk/include
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/samhain.h
r131 r132 45 45 #define SH_GRBUF_SIZE 4096 46 46 #define SH_PWBUF_SIZE 4096 47 #define SH_ERRBUF_SIZE 64 47 48 48 49 /* Sizes for arrays (user, group, timestamp). -
trunk/include/sh_error.h
r86 r132 176 176 /* error messages 177 177 */ 178 /*@owned@*/char * sh_error_message (int tellme );178 /*@owned@*/char * sh_error_message (int tellme, char * str, size_t len); 179 179 180 180 /* switch on/off log to file temporarily -
trunk/include/sh_pthread.h
r130 r132 23 23 } while (0) 24 24 25 #define SH_MUTEX_LOCK_UNSAFE(M) pthread_mutex_lock(&(M)) 26 #define SH_MUTEX_UNLOCK_UNSAFE(M) pthread_mutex_unlock(&(M)) 25 27 26 28 #else … … 32 34 #define SH_MUTEX_LOCK(M) ((void)0) 33 35 #define SH_MUTEX_UNLOCK(M) ((void)0) 36 #define SH_MUTEX_LOCK_UNSAFE(M) ((void)0) 37 #define SH_MUTEX_UNLOCK_UNSAFE(M) ((void)0) 34 38 35 39 /* #ifdef HAVE_PTHREAD */ -
trunk/include/sh_tools.h
r27 r132 16 16 17 17 #ifdef SH_ENCRYPT 18 char * errorExplain (int err_num); 18 /* returns pointer to errbuf 19 */ 20 char * errorExplain (int err_num, char * errbuf, size_t len); 19 21 #endif 20 22 23 /* returns allocated buffer 24 */ 21 25 char * sh_tools_safe_name(const char * str, int flag); 22 26 int is_numeric (const char * address); … … 26 30 char * ecall, int * errnum, char * errmsg, int errsiz); 27 31 void delete_cache(void); 28 char * sh_tools_errmessage (int tellme); 32 33 /* returns pointer to errbuf 34 */ 35 char * sh_tools_errmessage (int tellme, char * errbuf, size_t len); 29 36 30 37 … … 41 48 int check_request_nerr (char * have, char * need); 42 49 50 /* returns allocated buffer 51 */ 43 52 char * hash_me (char * key, char * buf, int buflen); 44 53 int sh_tools_hash_vfy(char * key, char * buf, int buflen); 45 54 55 /* returns allocated buffer 56 */ 46 57 char * get_client_conf_file (char * peer, unsigned long * length); 58 59 /* returns allocated buffer 60 */ 47 61 char * get_client_data_file (char * peer, unsigned long * length); 48 62 -
trunk/include/sh_unix.h
r114 r132 291 291 int sh_unix_init(int goDaemon); 292 292 293 /* for local time use thetime = 0 294 */ 295 /*@owned@*/ char * sh_unix_time (time_t thetime);296 297 /* convert to GMT time 298 */ 299 char * sh_unix_gmttime (time_t thetime );293 /* for local time use thetime = 0, returns pointer to buffer 294 */ 295 char * sh_unix_time (time_t thetime, char * buffer, size_t len); 296 297 /* convert to GMT time, returns pointer to buffer 298 */ 299 char * sh_unix_gmttime (time_t thetime, char * buffer, size_t len); 300 300 301 301 /* effective user info … … 303 303 int sh_unix_getUser (void); 304 304 305 /* get home directory 306 */ 307 char * sh_unix_getUIDdir (int level, uid_t uid );305 /* get home directory, , returns pointer to out 306 */ 307 char * sh_unix_getUIDdir (int level, uid_t uid, char * out, size_t len); 308 308 309 309 -
trunk/include/sh_utils.h
r93 r132 43 43 } st_format; 44 44 45 /* returns allocated string 46 */ 45 47 char * sh_util_formatted (const char * fmt, st_format * ftab); 46 48 … … 60 62 int taus_seed (void); 61 63 64 /* returns allocated memory 65 */ 62 66 char * sh_util_strdup (const char * str); 67 68 /* returns allocated memory 69 */ 63 70 char * sh_util_strdup_l (const char * str, size_t len); 71 72 /* returns pointer within str 73 */ 64 74 char * sh_util_strsep (char **str, const char *delim); 65 75 66 /* compactify verbose acl text 76 /* compactify verbose acl text, returns allocated memory 67 77 */ 68 78 char * sh_util_acl_compact (char * buf, ssize_t len); … … 146 156 147 157 /* returns freshly allocated memory, return value should be free'd. 148 * Ar hument list must be NULL terminated.158 * Argument list must be NULL terminated. 149 159 */ 150 160 char * sh_util_strconcat (const char * arg1, ...) SH_GNUC_NULL_TERMINATED;
Note:
See TracChangeset
for help on using the changeset viewer.