Project

General

Profile

Feature #11618

Use exec_attr instead of suid for smbfs mount and unmount

Added by Gordon Ross 23 days ago. Updated 19 days ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:

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).

History

#1

Updated by Gordon Ross 23 days ago

#2

Updated by Gordon Ross 20 days 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
#3

Updated by Electric Monk 20 days 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>

#4

Updated by Dan McDonald 19 days ago

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

Also available in: Atom PDF