A C string containing the user's requested mount options is constructed by
the main mount function in utils/mount/mount.c, but is never freed.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
nfs_error(_("%s: Passing mount options via a"
" string is unsupported by this"
" kernel\n"), progname);
nfs_error(_("%s: Passing mount options via a"
" string is unsupported by this"
" kernel\n"), progname);
}
if (uid != 0) {
nfs_error(_("%s: -i option is restricted to 'root'\n"),
progname);
}
if (uid != 0) {
nfs_error(_("%s: -i option is restricted to 'root'\n"),
progname);
}
++string;
break;
case 'h':
default:
mount_usage();
}
++string;
break;
case 'h':
default:
mount_usage();
*/
if (optind != argc - 2) {
mount_usage();
*/
if (optind != argc - 2) {
mount_usage();
}
if (strcmp(progname, "mount.nfs4") == 0)
}
if (strcmp(progname, "mount.nfs4") == 0)
strcmp(mc->m.mnt_type, fs_type) != 0) {
nfs_error(_("%s: permission denied: no match for %s "
"found in /etc/fstab"), progname, mount_point);
strcmp(mc->m.mnt_type, fs_type) != 0) {
nfs_error(_("%s: permission denied: no match for %s "
"found in /etc/fstab"), progname, mount_point);
mount_point = canonicalize(mount_point);
if (!mount_point) {
nfs_error(_("%s: no mount point provided"), progname);
mount_point = canonicalize(mount_point);
if (!mount_point) {
nfs_error(_("%s: no mount point provided"), progname);
}
if (mount_point[0] != '/') {
nfs_error(_("%s: unrecognized mount point %s"),
}
if (mount_point[0] != '/') {
nfs_error(_("%s: unrecognized mount point %s"),
free(extra_opts);
free(mount_point);
exit(mnt_err);
free(extra_opts);
free(mount_point);
exit(mnt_err);
+
+out_usage:
+ free(mount_opts);
+ exit(EX_USAGE);