Forums before death by AOL, social media and spammers... "We can't have nice things"
|    linux.debian.bugs.dist    |    Ohh some weird Debian bug report thing    |    28,835 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 26,896 of 28,835    |
|    Martin Pitt to All    |
|    Bug#770825: add sudoers entry to nsswitc    |
|    09 Feb 26 14:20:01    |
   
   From: mpitt@debian.org   
      
   Hello Timo and Marc,   
      
   This has become much more relevant now. Marc removed libnss-sudo [1], whose   
   postinst previously created the `sudoers: files` entry:   
      
   -------------- 8< ---------------   
    if ! grep -q -E '^sudoers:' "${DPKG_ROOT}/etc/nsswitch.conf" ; then   
    echo "sudoers: " >> "${DPKG_ROOT}/etc/nsswitch.conf"   
    fi   
   [...]   
    if ! grep -q -E -e '^sudoers:[^#]*\s(files)(\s|#|$)' "${DPKG_R   
   OT}/etc/nsswitch.conf" ; then   
    # Installing sudoers/files from libnss-sudo in position first   
    sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^sudoers:\s/ s   
   (:\s+)/\1files /'   
    fi   
   -------------- 8< ---------------   
      
   But this is gone now. Consequently, libsss-sudo's postinst does not add 'sss'   
   any more, as there is no 'sudoers:' line, and the `sed` just changes an   
   existing one:   
      
   -------------- 8< ---------------   
    if ! grep -q -E -e '^sudoers:[^#]*\s(sss)(\s|#|$)' "${DPKG_ROO   
   }/etc/nsswitch.conf" ; then   
    # Installing sudoers/sss from libsss-sudo in position last   
    sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^sudoers:\s[^#]*$/ s/$/   
   sss/' -e '/^sudoers:\s.*#/ s/#/ sss #/'   
    fi   
   -------------- 8< ---------------   
      
   That leaves sssd configuration of sudo rules broken by default now. Could   
   libsss-sudo adopt the "create entry" code from the late libnss-sudo?   
      
   Thanks,   
      
   Martin   
      
   P.S. Spotted in https://github.com/cockpit-project/bots/pull/8694   
      
   [1] https://salsa.debian.org/sudo-team/sudo/-/commit/d8cb4009462   
   3f53c91e9f3bc10f3b6ba7caab29   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca