delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/21/05:11:38

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sat, 21 Mar 2009 11:11:18 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: syslog-ng: some packaging glitches
Message-ID: <20090321101118.GV9322@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <af075b00903190936y1dd515fdi237abe92d7321b1b AT mail DOT gmail DOT com> <20090319182945 DOT GA9322 AT calimero DOT vinschen DOT de> <af075b00903191649j64e9e301s74b591bcbddef120 AT mail DOT gmail DOT com> <af075b00903200739t45e62630yb8b2ab9863a85620 AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <af075b00903200739t45e62630yb8b2ab9863a85620@mail.gmail.com>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Mar 20 14:39, Julio Emanuel wrote:
> Answering to myself: after some source code analysis, I've arrived to
> this tiny function in misc.c:
> 
> gboolean
> resolve_user(const char *user, uid_t *uid)
> {
>   struct passwd *pw;
> 
>   *uid = 0;
>   if (*user)
>     return FALSE;
> 
>   pw = getpwnam(user);
>   if (pw)
>     {
>       *uid = pw->pw_uid;
>     }
>   else
>     {
>       gchar *endptr;
> 
>       *uid = strtol(user, &endptr, 0);
>       if (*endptr)
>         return FALSE;
>     }
>   return TRUE;
> }

Good catch.  I will send this upstream as well, if it hasn't been
already fixed.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019