summaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/aicache.c4
-rw-r--r--nscd/grpcache.c4
-rw-r--r--nscd/hstcache.c4
-rw-r--r--nscd/pwdcache.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c
index 7fddd7d98c..8c2f3f1489 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -80,7 +80,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
if (db->secure)
{
oldeuid = geteuid ();
- seteuid (uid);
+ pthread_seteuid_np (uid);
}
static service_user *hosts_database;
@@ -426,7 +426,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
_res.options = old_res_options;
if (db->secure)
- seteuid (oldeuid);
+ pthread_seteuid_np (oldeuid);
if (dataset != NULL && !alloca_used)
{
diff --git a/nscd/grpcache.c b/nscd/grpcache.c
index bf4a225edd..d9d9139991 100644
--- a/nscd/grpcache.c
+++ b/nscd/grpcache.c
@@ -419,7 +419,7 @@ addgrbyX (struct database_dyn *db, int fd, request_header *req,
if (db->secure)
{
oldeuid = geteuid ();
- seteuid (uid);
+ pthread_seteuid_np (uid);
}
while (lookup (req->type, key, &resultbuf, buffer, buflen, &grp) != 0
@@ -456,7 +456,7 @@ addgrbyX (struct database_dyn *db, int fd, request_header *req,
}
if (db->secure)
- seteuid (oldeuid);
+ pthread_seteuid_np (oldeuid);
cache_addgr (db, fd, req, keystr, grp, uid, he, dh, errval);
diff --git a/nscd/hstcache.c b/nscd/hstcache.c
index 4066aeec7f..d001e6526c 100644
--- a/nscd/hstcache.c
+++ b/nscd/hstcache.c
@@ -442,7 +442,7 @@ addhstbyX (struct database_dyn *db, int fd, request_header *req,
if (db->secure)
{
oldeuid = geteuid ();
- seteuid (uid);
+ pthread_seteuid_np (uid);
}
while (lookup (req->type, key, &resultbuf, buffer, buflen, &hst) != 0
@@ -480,7 +480,7 @@ addhstbyX (struct database_dyn *db, int fd, request_header *req,
}
if (db->secure)
- seteuid (oldeuid);
+ pthread_seteuid_np (oldeuid);
cache_addhst (db, fd, req, key, hst, uid, he, dh,
h_errno == TRY_AGAIN ? errval : 0);
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
index 93049bab12..bfc9ec0e07 100644
--- a/nscd/pwdcache.c
+++ b/nscd/pwdcache.c
@@ -415,7 +415,7 @@ addpwbyX (struct database_dyn *db, int fd, request_header *req,
if (db->secure)
{
oldeuid = geteuid ();
- seteuid (c_uid);
+ pthread_seteuid_np (c_uid);
}
while (lookup (req->type, key, &resultbuf, buffer, buflen, &pwd) != 0
@@ -452,7 +452,7 @@ addpwbyX (struct database_dyn *db, int fd, request_header *req,
}
if (db->secure)
- seteuid (oldeuid);
+ pthread_seteuid_np (oldeuid);
/* Add the entry to the cache. */
cache_addpw (db, fd, req, keystr, pwd, c_uid, he, dh, errval);