diff options
Diffstat (limited to 'sbin/mount')
-rw-r--r-- | sbin/mount/mount.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index e968786..f944671 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -524,7 +524,11 @@ prmount(sfp) (void)printf(", %s", o->o_name); flags &= ~o->o_opt; } - if (sfp->f_owner) { + /* + * Inform when file system is mounted by an unprivileged user + * or privileged non-root user. + */ + if ((flags & MNT_USER) != 0 || sfp->owner != 0) { (void)printf(", mounted by "); if ((pw = getpwuid(sfp->f_owner)) != NULL) (void)printf("%s", pw->pw_name); |