Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libzfs tries to write to /dev/zfs and /etc/dfs on load #1559

Closed
floppym opened this issue Jun 30, 2013 · 2 comments
Closed

libzfs tries to write to /dev/zfs and /etc/dfs on load #1559

floppym opened this issue Jun 30, 2013 · 2 comments
Milestone

Comments

@floppym
Copy link

floppym commented Jun 30, 2013

libzfs (libshare?) tries to write to /dev/zfs and /etc/dfs on load. This is somewhat problematic when the library is loaded in a sandboxed environment.

For example, the GRUB bootloader has utilities which optionally link with libzfs. These utilities are invoked as part of the GRUB build process, which results in libzfs being loaded and triggers the following sandbox errors on Gentoo Linux:

 �[31;01m*�[0m --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
 �[31;01m*�[0m LOG FILE: "/var/log/sandbox/sandbox-23830.log"
 �[31;01m*�[0m 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /dev/zfs
A: /dev/zfs
R: /dev/zfs
C: grub-mkimage --help 

F: mkstemp64
S: deny
P: /etc/dfs/sharetab.XXXXXX
A: /etc/dfs/sharetab.XXXXXX
R: /etc/dfs/sharetab.XXXXXX
C: grub-mkimage --help 

Can the libshare library be modified to not write to these locations when the library is loaded?

I believe the relevant code path starts in the libshare_init function in lib/libshare/libshare.c.

@FransUrbo
Copy link
Contributor

Libshare needs to be redesigned/-written. Also see #1484

@behlendorf
Copy link
Contributor

This issue was resolved. The /dev/zfs device is not longer access when the library is loaded.

@behlendorf behlendorf modified the milestones: 0.6.4, 0.7.0 Oct 16, 2014
@behlendorf behlendorf added Bug - Minor and removed Type: Feature Feature request or new feature labels Oct 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants