From 356a62b8e650867d107773120c33531ea429f189 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 5 May 2015 23:46:54 +0200 Subject: activation: Make user copies of the skeletons writable. * gnu/build/activation.scm (make-file-writable, make-skeletons-writable): New procedures. (copy-account-skeletons): Call 'make-file-writable' after 'copy-file'. (add-user): Add call to 'make-skeletons-writable'. --- gnu/build/activation.scm | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'gnu/build/activation.scm') diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 0c60355a1c..8697d9d16d 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -78,6 +78,11 @@ (define %skeleton-directory (define (dot-or-dot-dot? file) (member file '("." ".."))) +(define (make-file-writable file) + "Make FILE writable for its owner.." + (let ((stat (lstat file))) ;XXX: symlinks + (chmod file (logior #o600 (stat:perms stat))))) + (define* (copy-account-skeletons home #:optional (directory %skeleton-directory)) "Copy the account skeletons from DIRECTORY to HOME." @@ -85,8 +90,21 @@ (define* (copy-account-skeletons home string