aboutsummaryrefslogtreecommitdiff
path: root/src/connection/as.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-26 14:06:58 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-09-09 11:19:40 -0700
commit3e4a8149efbf7d6515ec6ac542ee8882320763d0 (patch)
tree47ea0ced2be5ce4f2a5ab246d5e10a686a98694c /src/connection/as.lisp
parent009634f28b0443cc6a5dc37f733e281819c9947b (diff)
downloadconsfigurator-3e4a8149efbf7d6515ec6ac542ee8882320763d0.tar.gz
use CFFI, mostly via Osicat, for all syscalls/libc except fork(2)
Also replace some calls to chmod(1) with calls to chmod(2). Using CFFI rather than implementation-specific wrappers should be better for portability. Also with this commit we stop hard coding types like uid_t as :UNSIGNED-INT, which was less portable. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection/as.lisp')
-rw-r--r--src/connection/as.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connection/as.lisp b/src/connection/as.lisp
index 229d238..0a15cf8 100644
--- a/src/connection/as.lisp
+++ b/src/connection/as.lisp
@@ -21,7 +21,7 @@
;; currently we only check whether we're root, but, for example, on Linux, we
;; might have a CAP_* which lets us setuid as non-root
(defun can-setuid ()
- (zerop (foreign-funcall "geteuid" :unsigned-int)))
+ (zerop (nix:geteuid)))
(defmethod establish-connection ((type (eql :as)) remaining &key to)
"Establish a :SETUID or :SU connection to another user account, depending on