[PATCH] Don't read group names from /etc/group
Corinna Vinschen
vinschen at redhat.com
Thu Nov 6 00:25:23 EST 2014
On Nov 5 11:03, Damien Miller wrote:
> done - thanks again
Thank you. Unfortunately there was still one problem left in
ssh-host-config, which at one point reads from /etc/group when printing
the user's group membership. Patch below.
Thanks,
Corinna
Signed-off-by: Corinna Vinschen <vinschen at redhat.com>
---
contrib/cygwin/ssh-host-config | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config
index 301d5eb..3214829 100644
--- a/contrib/cygwin/ssh-host-config
+++ b/contrib/cygwin/ssh-host-config
@@ -623,10 +623,7 @@ then
csih_warning "However, it seems your account does not have these privileges."
csih_warning "Here's the list of groups in your user token:"
echo
- for i in $(/usr/bin/id -G)
- do
- /usr/bin/awk -F: "/[^:]*:[^:]*:$i:/{ print \" \" \$1; }" /etc/group
- done
+ /usr/bin/id -Gnz | xargs -0n1 echo " "
echo
csih_warning "This usually means you're running this script from a non-admin"
csih_warning "desktop session, or in a non-elevated shell under UAC control."
--
1.9.3
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20141105/f8fca052/attachment-0001.bin>
More information about the openssh-unix-dev
mailing list