Verified Commit 2f6f5024 authored by Hartmut Goebel's avatar Hartmut Goebel
Browse files

gnu: Add utempter -- TODO later

Todo:
- suid prog
- create user

* gnu/packages/screen.scm(utempter): New variable.
parent 55046b42
......@@ -27,6 +27,7 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
;-module (guix build utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages ncurses)
......@@ -181,3 +182,57 @@ reptyr to grab it, and then kill the @code{ssh} session and head on home.")
(supported-systems (fold delete %supported-systems
'("mips64el-linux" "aarch64-linux")))
(license expat)))
(define-public libutempter
(package
(name "libutempter")
(version "1.1.6")
(source
(origin
(method url-fetch)
(uri (string-append "ftp://ftp.altlinux.org/pub/people/ldv/utempter/"
"libutempter-" version ".tar.bz2"))
(sha256
(base32 "15y3xbgznjxnfmix4xg3bwmqdvghdw7slbhazb0ybmyf65gmd65q"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ;; no tests
;; hand-crafted Makefile uses DESTDIR instead of PREFIX
#:make-flags (list (string-append "DESTDIR=" %output)
"CC=gcc")
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda _
(substitute* "Makefile"
(("^libexecdir\\s+=\\s+.*$")
"libexecdir = /usr/libexec\n")
(("dir\\s+=\\s+/usr/") "dir = /"))
#t))
(add-after 'install 'link-binary
(lambda _
(let ((sbin (string-append %output "/sbin")))
(mkdir-p sbin)
(symlink "../libexec/utempter/utempter"
(string-append sbin "/utempter")))
#t)))))
(home-page "")
(synopsis "A privileged helper for utmp/wtmp updates")
(description "The libutempter library provides interface for terminal
emulators such as screen and xterm to record user sessions to utmp and wtmp
files.
The utempter is a privileged helper used by libutempter library to manipulate
utmp and wtmp files.")
(license lgpl2.1+)))
;; (define utempter-setuid-programs
;; ;; Return the file name of the setuid program that we need.
;; (match-lambda
;; (($ <dbus-configuration> dbus services)
;; (list (file-append dbus "/libexec/utempter/utempter")))))
;; chown root:utmp …/lib/utempter/utempter
;; chmod 2755 …/lib/utempter/utempter
;;/usr/sbin/groupadd -r -f utmp
;;/usr/sbin/groupadd -r -f utempter
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment