* 'sudoers' vs. 'hosts-file' @ 2015-06-14 12:47 Alex Kost 2015-06-14 21:48 ` Ludovic Courtès 2015-06-14 22:52 ` Daniel Pimentel 0 siblings, 2 replies; 7+ messages in thread From: Alex Kost @ 2015-06-14 12:47 UTC (permalink / raw) To: guix-devel Hello, Since there is no real difference between 'sudoers' and 'hosts-file' fields (of operating-system declaration), what about renaming one of them? So it could be either: 'sudoers-file' and 'hosts-file' or 'sudoers' and 'hosts' (I prefer the latter variant) -- Alex ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 'sudoers' vs. 'hosts-file' 2015-06-14 12:47 'sudoers' vs. 'hosts-file' Alex Kost @ 2015-06-14 21:48 ` Ludovic Courtès 2015-06-15 12:18 ` Alex Kost 2015-06-14 22:52 ` Daniel Pimentel 1 sibling, 1 reply; 7+ messages in thread From: Ludovic Courtès @ 2015-06-14 21:48 UTC (permalink / raw) To: Alex Kost; +Cc: guix-devel Alex Kost <alezost@gmail.com> skribis: > Since there is no real difference between 'sudoers' and 'hosts-file' > fields (of operating-system declaration), what about renaming one of > them? Makes sense. > So it could be either: > > 'sudoers-file' and 'hosts-file' > > or > > 'sudoers' and 'hosts' > > (I prefer the latter variant) I prefer the former because the value is really a file, and not, say, a list of user names or a list of host names. WDYT? Would you like to send a patch? Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 'sudoers' vs. 'hosts-file' 2015-06-14 21:48 ` Ludovic Courtès @ 2015-06-15 12:18 ` Alex Kost 2015-06-15 20:10 ` Ludovic Courtès 0 siblings, 1 reply; 7+ messages in thread From: Alex Kost @ 2015-06-15 12:18 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 690 bytes --] Ludovic Courtès (2015-06-15 00:48 +0300) wrote: > Alex Kost <alezost@gmail.com> skribis: > >> Since there is no real difference between 'sudoers' and 'hosts-file' >> fields (of operating-system declaration), what about renaming one of >> them? > > Makes sense. > >> So it could be either: >> >> 'sudoers-file' and 'hosts-file' >> >> or >> >> 'sudoers' and 'hosts' >> >> (I prefer the latter variant) > > I prefer the former because the value is really a file, and not, say, a > list of user names or a list of host names. > > WDYT? Indeed, thanks for the explanation. I agree with you. > Would you like to send a patch? Yes, the patch is attached. [-- Attachment #2: 0001-system-Rename-sudoers-into-sudoers-file.patch --] [-- Type: text/x-patch, Size: 3555 bytes --] From 3b221f12e6f5be01166772f5b23b648903342954 Mon Sep 17 00:00:00 2001 From: Alex Kost <alezost@gmail.com> Date: Mon, 15 Jun 2015 13:18:20 +0300 Subject: [PATCH] system: Rename 'sudoers' into 'sudoers-file'. * gnu/system.scm (<operating-system>): Rename record field. (etc-directory): Rename argument. (operating-system-etc-directory): Adjust accordingly. * doc/guix.texi (operating-system Reference): Likewise. --- doc/guix.texi | 4 ++-- gnu/system.scm | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 46dccb8..e356272 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4606,8 +4606,8 @@ Linux @dfn{pluggable authentication module} (PAM) services. List of string-valued G-expressions denoting setuid programs. @xref{Setuid Programs}. -@item @code{sudoers} (default: @var{%sudoers-specification}) -@cindex sudoers +@item @code{sudoers-file} (default: @var{%sudoers-specification}) +@cindex sudoers file The contents of the @file{/etc/sudoers} file as a file-like object (@pxref{G-Expressions, @code{local-file} and @code{plain-file}}). diff --git a/gnu/system.scm b/gnu/system.scm index 92ed454..565d6c1 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2015 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -148,8 +149,8 @@ (setuid-programs operating-system-setuid-programs (default %setuid-programs)) ; list of string-valued gexps - (sudoers operating-system-sudoers ; file-like - (default %sudoers-specification))) + (sudoers-file operating-system-sudoers-file ; file-like + (default %sudoers-specification))) \f ;;; @@ -440,7 +441,7 @@ on SHELLS. /etc/shells is used by xterm, polkit, and other programs." (pam-services '()) (profile "/run/current-system/profile") hosts-file nss (shells '()) - (sudoers (plain-file "sudoers" ""))) + (sudoers-file (plain-file "sudoers" ""))) "Return a derivation that builds the static part of the /etc directory." (mlet* %store-monad ((pam.d (pam-services->directory pam-services)) @@ -540,7 +541,7 @@ fi\n")) ("hosts" ,#~#$hosts-file) ("localtime" ,#~(string-append #$tzdata "/share/zoneinfo/" #$timezone)) - ("sudoers" ,sudoers))))) + ("sudoers" ,sudoers-file))))) (define (operating-system-profile os) "Return a derivation that builds the system profile of OS." @@ -624,9 +625,9 @@ use 'plain-file' instead~%") #:timezone (operating-system-timezone os) #:hosts-file /etc/hosts #:shells shells - #:sudoers (maybe-string->file - "sudoers" - (operating-system-sudoers os)) + #:sudoers-file (maybe-string->file + "sudoers" + (operating-system-sudoers-file os)) #:profile profile-drv))) (define %setuid-programs -- 2.2.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: 'sudoers' vs. 'hosts-file' 2015-06-15 12:18 ` Alex Kost @ 2015-06-15 20:10 ` Ludovic Courtès 0 siblings, 0 replies; 7+ messages in thread From: Ludovic Courtès @ 2015-06-15 20:10 UTC (permalink / raw) To: Alex Kost; +Cc: guix-devel Alex Kost <alezost@gmail.com> skribis: > From 3b221f12e6f5be01166772f5b23b648903342954 Mon Sep 17 00:00:00 2001 > From: Alex Kost <alezost@gmail.com> > Date: Mon, 15 Jun 2015 13:18:20 +0300 > Subject: [PATCH] system: Rename 'sudoers' into 'sudoers-file'. > > * gnu/system.scm (<operating-system>): Rename record field. > (etc-directory): Rename argument. > (operating-system-etc-directory): Adjust accordingly. > * doc/guix.texi (operating-system Reference): Likewise. LGTM, thank you! Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 'sudoers' vs. 'hosts-file' 2015-06-14 12:47 'sudoers' vs. 'hosts-file' Alex Kost 2015-06-14 21:48 ` Ludovic Courtès @ 2015-06-14 22:52 ` Daniel Pimentel 2015-06-15 12:17 ` Alex Kost 1 sibling, 1 reply; 7+ messages in thread From: Daniel Pimentel @ 2015-06-14 22:52 UTC (permalink / raw) To: Alex Kost; +Cc: guix-devel, guix-devel-bounces+d4n1=openmailbox.org On 2015-06-14 09:47, Alex Kost wrote: > Hello, > > Since there is no real difference between 'sudoers' and 'hosts-file' > fields (of operating-system declaration), what about renaming one of > them? So it could be either: > > 'sudoers-file' and 'hosts-file' > > or > > 'sudoers' and 'hosts' > > (I prefer the latter variant) Host file is trust relationship (for example host, IP). The sudoers is user/group that can use binary command as root (for example ifconfig, dd and other). -- Daniel Pimentel (d4n1) GnuPG (0B1A1914) FSF (13054) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 'sudoers' vs. 'hosts-file' 2015-06-14 22:52 ` Daniel Pimentel @ 2015-06-15 12:17 ` Alex Kost 2015-06-15 15:21 ` Daniel Pimentel 0 siblings, 1 reply; 7+ messages in thread From: Alex Kost @ 2015-06-15 12:17 UTC (permalink / raw) To: Daniel Pimentel; +Cc: guix-devel, guix-devel-bounces+d4n1=openmailbox.org Daniel Pimentel (2015-06-15 01:52 +0300) wrote: > On 2015-06-14 09:47, Alex Kost wrote: >> Hello, >> >> Since there is no real difference between 'sudoers' and 'hosts-file' >> fields (of operating-system declaration), what about renaming one of >> them? So it could be either: >> >> 'sudoers-file' and 'hosts-file' >> >> or >> >> 'sudoers' and 'hosts' >> >> (I prefer the latter variant) > > Host file is trust relationship (for example host, IP). The sudoers is > user/group that can use binary command as root (for example ifconfig, dd > and other). I didn't meant that those files are the same, I wanted to say that 'sudoers' and 'hosts-file' fields of 'operating-system' record should be named in the same manner as they are both file-like objects. Sorry for the confusion. -- Alex ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 'sudoers' vs. 'hosts-file' 2015-06-15 12:17 ` Alex Kost @ 2015-06-15 15:21 ` Daniel Pimentel 0 siblings, 0 replies; 7+ messages in thread From: Daniel Pimentel @ 2015-06-15 15:21 UTC (permalink / raw) To: Alex Kost; +Cc: guix-devel, guix-devel-bounces+d4n1=openmailbox.org On 2015-06-15 09:17, Alex Kost wrote: > Daniel Pimentel (2015-06-15 01:52 +0300) wrote: > >> On 2015-06-14 09:47, Alex Kost wrote: >>> Hello, >>> >>> Since there is no real difference between 'sudoers' and 'hosts-file' >>> fields (of operating-system declaration), what about renaming one of >>> them? So it could be either: >>> >>> 'sudoers-file' and 'hosts-file' >>> >>> or >>> >>> 'sudoers' and 'hosts' >>> >>> (I prefer the latter variant) >> >> Host file is trust relationship (for example host, IP). The sudoers is >> user/group that can use binary command as root (for example ifconfig, >> dd >> and other). > > I didn't meant that those files are the same, I wanted to say that > 'sudoers' and 'hosts-file' fields of 'operating-system' record should > be > named in the same manner as they are both file-like objects. Sorry for > the confusion. All right :) -- Daniel Pimentel (d4n1) GnuPG (0B1A1914) FSF (13054) ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-15 20:10 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-14 12:47 'sudoers' vs. 'hosts-file' Alex Kost 2015-06-14 21:48 ` Ludovic Courtès 2015-06-15 12:18 ` Alex Kost 2015-06-15 20:10 ` Ludovic Courtès 2015-06-14 22:52 ` Daniel Pimentel 2015-06-15 12:17 ` Alex Kost 2015-06-15 15:21 ` Daniel Pimentel
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).