|
ikent |
1e9cfc |
diff --git a/CHANGELOG b/CHANGELOG
|
|
ikent |
1e9cfc |
index 3a7f47e..d416684 100644
|
|
ikent |
1e9cfc |
--- a/CHANGELOG
|
|
ikent |
1e9cfc |
+++ b/CHANGELOG
|
|
ikent |
1e9cfc |
@@ -1,3 +1,7 @@
|
|
ikent |
1e9cfc |
+??/??/2007 autofs-5.0.2
|
|
ikent |
1e9cfc |
+-----------------------
|
|
ikent |
1e9cfc |
+- fix return check for getpwuid_r and getgrgid_r.
|
|
ikent |
1e9cfc |
+
|
|
ikent |
1e9cfc |
20/2/2007 autofs-5.0.1
|
|
ikent |
1e9cfc |
----------------------
|
|
ikent |
1e9cfc |
- fix typo in Fix typo in var when removing temp directory.
|
|
ikent |
1e9cfc |
diff --git a/daemon/direct.c b/daemon/direct.c
|
|
ikent |
1e9cfc |
index 0869858..2dc23db 100644
|
|
ikent |
1e9cfc |
--- a/daemon/direct.c
|
|
ikent |
1e9cfc |
+++ b/daemon/direct.c
|
|
ikent |
1e9cfc |
@@ -1335,7 +1335,7 @@ static void *do_mount_direct(void *arg)
|
|
ikent |
1e9cfc |
}
|
|
ikent |
1e9cfc |
|
|
ikent |
1e9cfc |
status = getpwuid_r(mt->uid, ppw, pw_tmp, tmplen, pppw);
|
|
ikent |
1e9cfc |
- if (status) {
|
|
ikent |
1e9cfc |
+ if (status || !ppw) {
|
|
ikent |
1e9cfc |
error(ap->logopt, "failed to get passwd info from getpwuid_r");
|
|
ikent |
1e9cfc |
free(tsv);
|
|
ikent |
1e9cfc |
free(pw_tmp);
|
|
ikent |
1e9cfc |
@@ -1382,7 +1382,7 @@ static void *do_mount_direct(void *arg)
|
|
ikent |
1e9cfc |
}
|
|
ikent |
1e9cfc |
|
|
ikent |
1e9cfc |
status = getgrgid_r(mt->gid, pgr, gr_tmp, tmplen, ppgr);
|
|
ikent |
1e9cfc |
- if (status) {
|
|
ikent |
1e9cfc |
+ if (status || !pgr) {
|
|
ikent |
1e9cfc |
error(ap->logopt, "failed to get group info from getgrgid_r");
|
|
ikent |
1e9cfc |
free(tsv->user);
|
|
ikent |
1e9cfc |
free(tsv->home);
|
|
ikent |
1e9cfc |
diff --git a/daemon/indirect.c b/daemon/indirect.c
|
|
ikent |
1e9cfc |
index 46e3f99..2068c16 100644
|
|
ikent |
1e9cfc |
--- a/daemon/indirect.c
|
|
ikent |
1e9cfc |
+++ b/daemon/indirect.c
|
|
ikent |
1e9cfc |
@@ -807,7 +807,7 @@ static void *do_mount_indirect(void *arg)
|
|
ikent |
1e9cfc |
}
|
|
ikent |
1e9cfc |
|
|
ikent |
1e9cfc |
status = getpwuid_r(mt->uid, ppw, pw_tmp, tmplen, pppw);
|
|
ikent |
1e9cfc |
- if (status) {
|
|
ikent |
1e9cfc |
+ if (status || !ppw) {
|
|
ikent |
1e9cfc |
error(ap->logopt, "failed to get passwd info from getpwuid_r");
|
|
ikent |
1e9cfc |
free(tsv);
|
|
ikent |
1e9cfc |
free(pw_tmp);
|
|
ikent |
1e9cfc |
@@ -854,7 +854,7 @@ static void *do_mount_indirect(void *arg)
|
|
ikent |
1e9cfc |
}
|
|
ikent |
1e9cfc |
|
|
ikent |
1e9cfc |
status = getgrgid_r(mt->gid, pgr, gr_tmp, tmplen, ppgr);
|
|
ikent |
1e9cfc |
- if (status) {
|
|
ikent |
1e9cfc |
+ if (status || !pgr) {
|
|
ikent |
1e9cfc |
error(ap->logopt, "failed to get group info from getgrgid_r");
|
|
ikent |
1e9cfc |
free(tsv->user);
|
|
ikent |
1e9cfc |
free(tsv->home);
|