[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
udevil and setuid
From: |
Gabriel Hondet |
Subject: |
udevil and setuid |
Date: |
Mon, 24 Dec 2018 12:58:01 +0100 |
User-agent: |
mu4e 1.0; emacs 26.1 |
Hello,
I'm currently trying to package udevil
(https://ignorantguru.github.io/udevil/) for guix. The executable needs
to have the suid. Therefore I added a phase in the standard phases
which adds this suid (after install). However, after building, the
resulting package in the store (at
/gnu/store/whatever-udevil-0.4.4/bin/udevil) does not have the suid
properly set. Here is the full package specification:
#+begin_src scheme
(define-public udevil
(package
(name "udevil")
(home-page "https://ignorantguru.github.io/udevil/")
(version "0.4.4")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/ignorantguru/udevil")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0x9mjr9abvbxzfa9mrip5264iz1qxvsl01k3ybz95q4a7xl4jcb3"))
(modules '((guix build utils)))
(snippet
'(begin
(substitute* "src/Makefile.am" (("-o root -g root") ""))
(substitute* "src/Makefile.in" (("-o root -g root") ""))))))
(build-system gnu-build-system)
(inputs
`(("glib" ,glib)
("eudev" ,eudev)))
(native-inputs
`(("pkg-config" ,pkg-config)
("intltool" ,intltool)))
(arguments
`(#:configure-flags (list
(string-append "--sysconfdir="
(assoc-ref %outputs "out") "/etc"))
#:phases
(modify-phases %standard-phases
(add-after 'install 'set-suid
(lambda _
(let* ((out (assoc-ref %outputs "out"))
(outbin (string-append out "/bin/udevil")))
(chmod outbin #o4555)
#t))))))
(synopsis "Mount without password")
(description "udevil is a command line Linux program which mounts and
unmounts removable devices without a password, shows device info, and monitors
device changes. It can also mount ISO files, nfs://, smb://, ftp://, ssh://
and WebDAV URLs, and tmpfs/ramfs filesystems.
@itemize @bullet
@item Intended as a hassle-free replacement for udisks
@item Highly configurable & security conscious
@item Requires no daemon running
@item To use it, just prefix a normal mount command with @code{udevil}
@item Can replace udisks in the SpaceFM file manager and the devmon
@end itemize
automounting daemon (devmon is included with udevil)")
(license license:gpl3+)))
#+end_src
Thanks for your help
signature.asc
Description: PGP signature
- udevil and setuid,
Gabriel Hondet <=