diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-01 20:43:44 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-01 20:43:44 +0000 |
commit | 8a0b43005ad9ea011b80d66e32b46fb430ddaffb (patch) | |
tree | 418818740042c5dbba244bc1efc760c8d29e47a9 /libc/pwd_grp | |
parent | 42b161bb716f35948fabd36472fb59cd0a20fa92 (diff) |
Hide mostly used functions
Diffstat (limited to 'libc/pwd_grp')
-rw-r--r-- | libc/pwd_grp/lckpwdf.c | 22 | ||||
-rw-r--r-- | libc/pwd_grp/pwd_grp.c | 20 |
2 files changed, 21 insertions, 21 deletions
diff --git a/libc/pwd_grp/lckpwdf.c b/libc/pwd_grp/lckpwdf.c index 6b9c2519b..bac807e6f 100644 --- a/libc/pwd_grp/lckpwdf.c +++ b/libc/pwd_grp/lckpwdf.c @@ -64,7 +64,7 @@ int lckpwdf (void) LOCK; - lock_fd = open (_PATH_PASSWD, O_WRONLY); + lock_fd = __open (_PATH_PASSWD, O_WRONLY); if (lock_fd == -1) { /* Cannot create lock file. */ UNLOCK; @@ -75,7 +75,7 @@ int lckpwdf (void) flags = fcntl (lock_fd, F_GETFD, 0); if (flags == -1) { /* Cannot get file flags. */ - close(lock_fd); + __close(lock_fd); lock_fd = -1; UNLOCK; return -1; @@ -83,7 +83,7 @@ int lckpwdf (void) flags |= FD_CLOEXEC; /* Close on exit. */ if (fcntl (lock_fd, F_SETFD, flags) < 0) { /* Cannot set new flags. */ - close(lock_fd); + __close(lock_fd); lock_fd = -1; UNLOCK; return -1; @@ -97,7 +97,7 @@ int lckpwdf (void) It is important that we don't change the signal state. We must restore the old signal behaviour. */ - memset (&new_act, '\0', sizeof (struct sigaction)); + __memset (&new_act, '\0', sizeof (struct sigaction)); new_act.sa_handler = noop_handler; sigfillset (&new_act.sa_mask); new_act.sa_flags = 0ul; @@ -105,7 +105,7 @@ int lckpwdf (void) /* Install new action handler for alarm and save old. */ if (sigaction (SIGALRM, &new_act, &saved_act) < 0) { /* Cannot install signal handler. */ - close(lock_fd); + __close(lock_fd); lock_fd = -1; UNLOCK; return -1; @@ -114,9 +114,9 @@ int lckpwdf (void) /* Now make sure the alarm signal is not blocked. */ sigemptyset (&new_set); sigaddset (&new_set, SIGALRM); - if (sigprocmask (SIG_UNBLOCK, &new_set, &saved_set) < 0) { + if (__sigprocmask (SIG_UNBLOCK, &new_set, &saved_set) < 0) { sigaction (SIGALRM, &saved_act, NULL); - close(lock_fd); + __close(lock_fd); lock_fd = -1; UNLOCK; return -1; @@ -127,7 +127,7 @@ int lckpwdf (void) alarm (TIMEOUT); /* Try to get the lock. */ - memset (&fl, '\0', sizeof (struct flock)); + __memset (&fl, '\0', sizeof (struct flock)); fl.l_type = F_WRLCK; fl.l_whence = SEEK_SET; result = fcntl (lock_fd, F_SETLKW, &fl); @@ -137,14 +137,14 @@ int lckpwdf (void) /* Restore old set of handled signals. We don't need to know about the current one.*/ - sigprocmask (SIG_SETMASK, &saved_set, NULL); + __sigprocmask (SIG_SETMASK, &saved_set, NULL); /* Restore old action handler for alarm. We don't need to know about the current one. */ sigaction (SIGALRM, &saved_act, NULL); if (result < 0) { - close(lock_fd); + __close(lock_fd); lock_fd = -1; UNLOCK; return -1; @@ -165,7 +165,7 @@ int ulckpwdf (void) } else { LOCK; - result = close (lock_fd); + result = __close (lock_fd); /* Mark descriptor as unused. */ lock_fd = -1; UNLOCK; diff --git a/libc/pwd_grp/pwd_grp.c b/libc/pwd_grp/pwd_grp.c index 2682b83a1..3baa0ad33 100644 --- a/libc/pwd_grp/pwd_grp.c +++ b/libc/pwd_grp/pwd_grp.c @@ -190,10 +190,10 @@ int sgetspent_r(const char *string, struct spwd *result_buf, } if (string != buffer) { - if (strlen(string) >= buflen) { + if (__strlen(string) >= buflen) { goto DO_ERANGE; } - strcpy(buffer, string); + __strcpy(buffer, string); } if (!(rv = __parsespent(result_buf, buffer))) { @@ -215,7 +215,7 @@ int sgetspent_r(const char *string, struct spwd *result_buf, #define GETXXKEY_R_FUNC getpwnam_r #define GETXXKEY_R_PARSER __parsepwent #define GETXXKEY_R_ENTTYPE struct passwd -#define GETXXKEY_R_TEST(ENT) (!strcmp((ENT)->pw_name, key)) +#define GETXXKEY_R_TEST(ENT) (!__strcmp((ENT)->pw_name, key)) #define DO_GETXXKEY_R_KEYTYPE const char *__restrict #define DO_GETXXKEY_R_PATHNAME _PATH_PASSWD #include "pwd_grp_internal.c" @@ -225,7 +225,7 @@ int sgetspent_r(const char *string, struct spwd *result_buf, #define GETXXKEY_R_FUNC getgrnam_r #define GETXXKEY_R_PARSER __parsegrent #define GETXXKEY_R_ENTTYPE struct group -#define GETXXKEY_R_TEST(ENT) (!strcmp((ENT)->gr_name, key)) +#define GETXXKEY_R_TEST(ENT) (!__strcmp((ENT)->gr_name, key)) #define DO_GETXXKEY_R_KEYTYPE const char *__restrict #define DO_GETXXKEY_R_PATHNAME _PATH_GROUP #include "pwd_grp_internal.c" @@ -235,7 +235,7 @@ int sgetspent_r(const char *string, struct spwd *result_buf, #define GETXXKEY_R_FUNC getspnam_r #define GETXXKEY_R_PARSER __parsespent #define GETXXKEY_R_ENTTYPE struct spwd -#define GETXXKEY_R_TEST(ENT) (!strcmp((ENT)->sp_namp, key)) +#define GETXXKEY_R_TEST(ENT) (!__strcmp((ENT)->sp_namp, key)) #define DO_GETXXKEY_R_KEYTYPE const char *__restrict #define DO_GETXXKEY_R_PATHNAME _PATH_SHADOW #include "pwd_grp_internal.c" @@ -658,7 +658,7 @@ int initgroups(const char *user, gid_t gid) assert(group.gr_mem); /* Must have at least a NULL terminator. */ if (group.gr_gid != gid) { for (m=group.gr_mem ; *m ; m++) { - if (!strcmp(*m, user)) { + if (!__strcmp(*m, user)) { if (!(num_groups & 7)) { gid_t *tmp = (gid_t *) realloc(group_list, @@ -851,7 +851,7 @@ int attribute_hidden __parsepwent(void *data, char *line) /* NOTE: glibc difference - glibc allows omission of * ':' seperators after the gid field if all remaining * entries are empty. We require all separators. */ - if (!(line = strchr(line, ':'))) { + if (!(line = __strchr(line, ':'))) { break; } } else { @@ -903,7 +903,7 @@ int attribute_hidden __parsegrent(void *data, char *line) if (i < 2) { *((char **) p) = line; - if (!(line = strchr(line, ':'))) { + if (!(line = __strchr(line, ':'))) { break; } *line++ = 0; @@ -1003,7 +1003,7 @@ int attribute_hidden __parsespent(void *data, char * line) p = ((char *) ((struct spwd *) data)) + sp_off[i]; if (i < 2) { *((char **) p) = line; - if (!(line = strchr(line, ':'))) { + if (!(line = __strchr(line, ':'))) { break; } } else { @@ -1080,7 +1080,7 @@ int attribute_hidden __pgsreader(int (*__parserfunc)(void *d, char *line), void break; } - line_len = strlen(line_buff) - 1; /* strlen() must be > 0. */ + line_len = __strlen(line_buff) - 1; /* strlen() must be > 0. */ if (line_buff[line_len] == '\n') { line_buff[line_len] = 0; } else if (line_len + 2 == buflen) { /* line too long */ |