Project

General

Profile

Actions

Feature #11618

closed

Use exec_attr instead of suid for smbfs mount and unmount

Added by Gordon Ross about 4 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

The smbfs mount and unmount programs were ported from an older code base that used suid permissions on those programs in order to allow them to add sys_mount privilege.
This feature request changes those programs to use the more modern approach of granting sys_mount privilege via exec_attr(4).

Actions #2

Updated by Gordon Ross about 4 years ago

Works now. Running as a regular user (not root)

gwr@gwr-oi2$ mkdir H
gwr@gwr-oi2$ mount -F smbfs //gwr@sm20lab/home_gwr H
gwr@gwr-oi2$ ls H
[...]
gwr@gwr-oi2$ umount H
Actions #3

Updated by Electric Monk about 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 0463c8009260e445fd1885cfaf98e04a586d495b

commit  0463c8009260e445fd1885cfaf98e04a586d495b
Author: Gordon Ross <gwr@nexenta.com>
Date:   2019-08-27T19:49:40.000Z

    11618 Use exec_attr instead of suid for smbfs mount and unmount
    Reviewed by: Jason King <jason.king@joyent.com>
    Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Actions #4

Updated by Dan McDonald about 4 years ago

A missing reviewer (who found the caused-more-problems-than-it-solved sprintf() of argv0) is Marco Ivaldi <>.

Actions

Also available in: Atom PDF