Changeset 131 for trunk/include


Ignore:
Timestamp:
Oct 22, 2007, 11:19:15 PM (17 years ago)
Author:
rainer
Message:

Use thread-safe libc functions.

Location:
trunk/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/samhain.h

    r115 r131  
    4242#define SH_MAXBUF      4096
    4343#define SH_PATHBUF      256
     44
     45#define SH_GRBUF_SIZE  4096
     46#define SH_PWBUF_SIZE  4096
    4447
    4548/* Sizes for arrays (user, group, timestamp).
  • trunk/include/sh_files.h

    r27 r131  
    2121#define SH_FILES_H
    2222
     23struct sh_dirent {
     24  char             * sh_d_name;
     25  struct sh_dirent * next;
     26};
     27
     28/* free a directory listing
     29 */
     30void kill_sh_dirlist (struct sh_dirent * dirlist);
     31
     32/* add an entry to a directory listing
     33 */
     34struct sh_dirent * addto_sh_dirlist (struct dirent * thisEntry,
     35                                     struct sh_dirent * dirlist);
    2336/* register exceptions to hardlink check
    2437 */
  • trunk/include/sh_static.h

    r111 r131  
    1515void  sh_setpwent(void);
    1616struct group * sh_getgrnam(const char *name);
     17
    1718struct passwd * sh_getpwnam(const char *name);
     19int getpwnam_r(const char *name, struct passwd *pwbuf,
     20               char *buf, size_t buflen, struct passwd **pwbufp);
     21
    1822struct group * sh_getgrgid(gid_t gid);
     23int getgrgid_r(gid_t gid, struct group *gbuf,
     24               char *buf, size_t buflen, struct group **gbufp);
     25
    1926struct passwd * sh_getpwuid(uid_t uid);
     27int getpwuid_r(uid_t uid, struct passwd *pwbuf,
     28               char *buf, size_t buflen, struct passwd **pwbufp);
     29
    2030#endif
    2131
     
    2939#define sh_initgroups initgroups
    3040#define sh_getgrgid   getgrgid
     41#define sh_getgrgid_r getgrgid_r
     42#define sh_getpwnam   getpwnam
     43#define sh_getpwnam_r getpwnam_r
     44#define sh_getpwuid   getpwuid
     45#define sh_getpwuid_r getpwuid_r
    3146#define sh_getpwent   getpwent
    32 #define sh_getpwnam   getpwnam
    33 #define sh_getpwuid   getpwuid
    3447#define sh_endpwent   endpwent
    3548#define sh_setpwent   setpwent
  • trunk/include/slib.h

    r76 r131  
    353353  int sl_read_timeout_prep (SL_TICKET ticket);
    354354
     355  int sl_read_timeout_fd (int fd, void * buf,
     356                          size_t count, int timeout, int is_nonblocking);
     357
    355358  int sl_read_timeout (SL_TICKET ticket, void * buf,
    356                        size_t count, int timeout);
     359                       size_t count, int timeout, int is_nonblocking);
    357360
    358361  int sl_read_fast (SL_TICKET ticket, void * buf_in, size_t count);
Note: See TracChangeset for help on using the changeset viewer.