diff options
author | iedowse <iedowse@FreeBSD.org> | 2001-08-02 21:46:21 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2001-08-02 21:46:21 +0000 |
commit | 9e402fc673a4a5ca4c028ecc7b367b90734ddb2b (patch) | |
tree | 5820219ef408d8a58e26e08c801ca601f759dd51 /usr.sbin/rpc.umntall/mounttab.c | |
parent | 064d84b2521ca869363580e56d314e48668cb3ab (diff) | |
download | FreeBSD-src-9e402fc673a4a5ca4c028ecc7b367b90734ddb2b.zip FreeBSD-src-9e402fc673a4a5ca4c028ecc7b367b90734ddb2b.tar.gz |
Fix a few bugs, some of which I introduced in recent commits:
- clean_mtab():
Actually use the strdup'd version of the host that we go to the
trouble of creating.
- do_umntall/do_umount:
Don't return success if clnt_create() fails.
Don't access a client pointer after it has been destroyed.
Remember to destroy the authentication information we created.
Diffstat (limited to 'usr.sbin/rpc.umntall/mounttab.c')
-rw-r--r-- | usr.sbin/rpc.umntall/mounttab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/rpc.umntall/mounttab.c b/usr.sbin/rpc.umntall/mounttab.c index d4b1865..01ce78c 100644 --- a/usr.sbin/rpc.umntall/mounttab.c +++ b/usr.sbin/rpc.umntall/mounttab.c @@ -189,7 +189,7 @@ clean_mtab(char *hostp, char *dirp, int verbose) { /* Copy hostp in case it points to an entry that we are zeroing out. */ host = strdup(hostp); for (mtabp = mtabhead; mtabp != NULL; mtabp = mtabp->mtab_next) { - if (strcmp(mtabp->mtab_host, hostp) != 0) + if (strcmp(mtabp->mtab_host, host) != 0) continue; if (dirp != NULL && strcmp(mtabp->mtab_dirp, dirp) != 0) continue; |