[PATCH] contrib/cygwin/ssh-host-config: Reliability fix

Corinna Vinschen vinschen at redhat.com
Sun Mar 13 20:57:34 EST 2005


Hi,

the below patch makes the query for the localized name of the local
administrators group more reliable.  Can somebody check it in, please?


Thanks,
Corinna

Index: ssh-host-config
===================================================================
RCS file: /cvs/openssh_cvs/contrib/cygwin/ssh-host-config,v
retrieving revision 1.15
diff -p -u -r1.15 ssh-host-config
--- ssh-host-config	21 Sep 2004 11:35:56 -0000	1.15
+++ ssh-host-config	13 Mar 2005 09:45:30 -0000
@@ -449,12 +449,10 @@ then
 	  echo "Should this script create a new local account 'sshd_server' which has"
 	  if request "the required privileges?"
 	  then
-	    _admingroup=`awk -F: '{if ( $1 != "root" && $2 == "S-1-5-32-544" ) print $1;}' ${SYSCONFDIR}/group`
+	    _admingroup=`mkgroup -l | awk -F: '{if ( $2 == "S-1-5-32-544" ) print $1;}' `
 	    if [ -z "${_admingroup}" ]
 	    then
-	      echo "There's no group with SID S-1-5-32-544 (Local administrators group) in"
-	      echo "your ${SYSCONFDIR}/group file.  Please regenerate this entry using 'mkgroup -l'"
-	      echo "and restart this script."
+	      echo "mkgroup -l produces no group with SID S-1-5-32-544 (Local administrators group)."
 	      exit 1
 	    fi
 	    dos_var_empty=`cygpath -w ${LOCALSTATEDIR}/empty`

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.




More information about the openssh-unix-dev mailing list