delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; q=dns; s=default; b=pbQAv4qH5bQnY36M | |
vnqgFN15PMfpI2d0fSO1ZVhSKJ/8iDdHe1tKEgdy9hzQy89UAF100f3s135CQOM/ | |
KYnBFJZpOL86DHb3vUMCa5OZ9AgCsTHVIW3H2J1HTrQ6hGhWyHTXfkYY/AUXRsdg | |
aMmVe65FCDSTjyYVa2mHQDInaQQ= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; s=default; bh=FJNNNQfYdsIPMr/sv5Cc/D | |
UTWD0=; b=x9/IWSYTDUBiTUTq4LCJ1xu8oYbGgAfhDoo/NslG4JByvdTaq/HG0Y | |
n5SvC3NL1TZaJlgQa9vxB39/wi+N1QOoHj5oWmHNzb+tknVxN519mtq54Q1j7LMH | |
XQsd1VCmWnoRbGbmQWIVD+ELRwANi4s8xwCxdIseJ4GaQBxPQe/WE= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-2.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_BL_SPAMCOP_NET,SPF_SOFTFAIL autolearn=no version=3.3.2 |
X-HELO: | smtpback.ht-systems.ru |
Date: | Fri, 14 Mar 2014 02:37:49 +0400 |
From: | Andrey Repin <anrdaemon AT yandex DOT ru> |
Reply-To: | cygwin AT cygwin DOT com |
Message-ID: | <1797360578.20140314023749@yandex.ru> |
To: | "PANEL Vincent (CIS/SIN)" <Vincent DOT Panel AT belgacom DOT be>, cygwin AT cygwin DOT com |
Subject: | Re: Getting groups you belong to in perl |
In-Reply-To: | <09C6BA32B7B1654B8AB0CAF234F2A1C114E65CBA@A04066.BGC.NET> |
References: | <09C6BA32B7B1654B8AB0CAF234F2A1C114E65CBA AT A04066 DOT BGC DOT NET> |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Greetings, PANEL Vincent (CIS/SIN)! > Don't know if this list is more appropriate than the Perl one but my > question is actually about porting a Perl script to Cygwin. I need to check > if the current user running the script belongs to a pre-defined group. > Under *nix, I get the list of users belonging to the group and see if the > current user is in this list. How exactly you are doing this? (I hope you're not reading it from /etc/group, because that file may not exist at all, or contain exactly zero relevant information.) > Cygwin doesn't allow this way of working. Oh... ? > I found out by reading the thread "Why mkgroup does not list group members?" > on this mailing list (1 message on Mon, 13 May 2013 20:29:52, for instance). > I would like to use perl commands without launching external commands, if > possible. The way I've found until now is by using the output of the "id" > command but I was wondering if there was another way to do it. How is "id" > command working by the way ? You can check the sources of it, it's really a very simple tool. (It's coreutils, by the way. http://mirrors.kernel.org/sourceware/cygwin/x86/release/coreutils/ ) -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 14.03.2014, <02:12> Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |