diff options
author | Ted Cheng <tedcheng@symas.com> | 2010-10-09 17:26:31 +0000 |
---|---|---|
committer | Ted Cheng <tedcheng@symas.com> | 2010-10-09 17:26:31 +0000 |
commit | bdbeab5693d7c28df3174d5352d5a3ff78b22d92 (patch) | |
tree | 68ac871057e64b3a1e494e8ec1bedd0d82a0a843 /nss/shadow.c | |
parent | 611dc583a05914f81c97c165163bcce021b0dfac (diff) |
nss-pam-ldapd fixes for solaris 10 build
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1247 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/shadow.c')
-rw-r--r-- | nss/shadow.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nss/shadow.c b/nss/shadow.c index 4ccb7b6..7e5e7ce 100644 --- a/nss/shadow.c +++ b/nss/shadow.c @@ -30,6 +30,9 @@ #include "common.h" #include "compat/attrs.h" +/* thread-local file pointer to an ongoing request */ +static __thread TFILE *spentfp; + /* read a single shadow entry from the stream */ static nss_status_t read_spwd( TFILE *fp,struct spwd *result, @@ -63,7 +66,7 @@ nss_status_t _nss_ldap_getspnam_r( } /* thread-local file pointer to an ongoing request */ -static __thread TFILE *spentfp; +/* static __thread TFILE *spentfp; */ /* start listing all shadow users */ nss_status_t _nss_ldap_setspent(int UNUSED(stayopen)) @@ -108,7 +111,6 @@ static nss_status_t _xnss_ldap_getspnam_r(nss_backend_t UNUSED(*be),void *args) char *buffer=NSS_ARGS(args)->buf.buffer; size_t buflen=NSS_ARGS(args)->buf.buflen; char *data_ptr; - char field_buf[128]; nss_status_t status; if (NSS_ARGS(args)->buf.buflen<0) { @@ -122,6 +124,7 @@ static nss_status_t _xnss_ldap_getspnam_r(nss_backend_t UNUSED(*be),void *args) { /* result==NULL, return file format */ data_ptr=(char *)malloc(buflen); + char field_buf[128]; sprintf(data_ptr,"%s:%s:",sp->sp_namp,sp->sp_pwdp); if (sp->sp_lstchg >= 0) sprintf(field_buf,"%d:",sp->sp_lstchg); @@ -170,9 +173,6 @@ static nss_status_t _xnss_ldap_getspnam_r(nss_backend_t UNUSED(*be),void *args) return status; } -/* thread-local file pointer to an ongoing request */ -static __thread TFILE *spentfp; - static nss_status_t _xnss_ldap_setspent(nss_backend_t UNUSED(*be),void UNUSED(*args)) { NSS_SETENT(spentfp); |