summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
44a3727)
Reject if there are non-flag args,
Reject if the filesystem is not an NFS filesystem.
+ if (optind != argc) {
+ umount_usage();
+ return 0;
+ }
if (spec == NULL || (*spec != '/' && strchr(spec,':') == NULL)) {
printf(_("umount: %s: not found\n"), spec);
if (spec == NULL || (*spec != '/' && strchr(spec,':') == NULL)) {
printf(_("umount: %s: not found\n"), spec);
if (!mc && verbose)
printf(_("Could not find %s in mtab\n"), spec);
if (!mc && verbose)
printf(_("Could not find %s in mtab\n"), spec);
+ if (mc && strcmp(mc->m.mnt_type, "nfs") != 0 &&
+ strcmp(mc->m.mnt_type, "nfs4") != 0) {
+ fprintf(stderr, "umount.nfs: %s on %s it not an nfs filesystem\n",
+ mc->m.mnt_fsname, mc->m.mnt_dir);
+ exit(1);
+ }
+
if (getuid() != 0) {
/* only permitted if "user=" or "users" is in mount options */
if (!mc) {
if (getuid() != 0) {
/* only permitted if "user=" or "users" is in mount options */
if (!mc) {