FreeBSD Bugzilla – Attachment 222930 Details for
Bug 251906
autofs: automounter always only adds to /var/db/mounttab but never clears it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
use rpc.umntall(8) after succesful unmount(2)
attempt4.patch (text/plain), 1.63 KB, created by
Robert Wing
on 2021-03-03 00:27:33 UTC
(
hide
)
Description:
use rpc.umntall(8) after succesful unmount(2)
Filename:
MIME Type:
Creator:
Robert Wing
Created:
2021-03-03 00:27:33 UTC
Size:
1.63 KB
patch
obsolete
>diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c >index e28129eee5b8..cd29c910bce2 100644 >--- a/usr.sbin/autofs/automount.c >+++ b/usr.sbin/autofs/automount.c >@@ -80,6 +80,8 @@ unmount_by_statfs(const struct statfs *sb, bool force) > free(fsid_str); > if (error != 0) > log_warn("cannot unmount %s", sb->f_mntonname); >+ else >+ rpc_umntall(); > > return (error); > } >diff --git a/usr.sbin/autofs/autounmountd.c b/usr.sbin/autofs/autounmountd.c >index 7a4f04c0b848..57375f04d743 100644 >--- a/usr.sbin/autofs/autounmountd.c >+++ b/usr.sbin/autofs/autounmountd.c >@@ -170,7 +170,8 @@ unmount_by_fsid(const fsid_t fsid, const char *mountpoint) > log_warn("cannot unmount %s (%s)", > mountpoint, fsid_str); > } >- } >+ } else >+ rpc_umntall(); > > free(fsid_str); > >diff --git a/usr.sbin/autofs/common.c b/usr.sbin/autofs/common.c >index 7c8df4205a86..4581e5c4f2f9 100644 >--- a/usr.sbin/autofs/common.c >+++ b/usr.sbin/autofs/common.c >@@ -1204,6 +1204,19 @@ lesser_daemon(void) > } > } > >+/* >+ * Applicable to NFSv3 only, see rpc.umntall(8). >+ */ >+void >+rpc_umntall(void) >+{ >+ FILE *f; >+ >+ f = auto_popen("rpc.umntall", "-k", NULL); >+ assert(f != NULL); >+ auto_pclose(f); >+} >+ > int > main(int argc, char **argv) > { >diff --git a/usr.sbin/autofs/common.h b/usr.sbin/autofs/common.h >index 34257c1caeff..e68a0be5f7c8 100644 >--- a/usr.sbin/autofs/common.h >+++ b/usr.sbin/autofs/common.h >@@ -96,6 +96,7 @@ char *defined_expand(const char *string); > void defined_init(void); > void defined_parse_and_add(char *def); > void lesser_daemon(void); >+void rpc_umntall(void); > > int main_automount(int argc, char **argv); > int main_automountd(int argc, char **argv);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251906
:
221111
|
221372
| 222930