delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/20/14:59:10

Date: Sun, 20 May 2001 21:59:07 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Message-Id: <7458-Sun20May2001215907+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <3B0800A3.5D645963@phekda.freeserve.co.uk> (message from Richard
Dawe on Sun, 20 May 2001 18:36:35 +0100)
Subject: Re: ANNOUNCE: Fileutils 4.0 beta 2
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010520172522 DOT 23429A-100000 AT is> <3B0800A3 DOT 5D645963 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Sun, 20 May 2001 18:36:35 +0100
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> [snip]
> > In theory, yes.  But userspec.c is not a library function, it is only
> > used by certain programs, and those programs do their thing and then
> > exit.
> 
> But it's in the shared code / platform support code in lib/ - surely that
> counts as a library? I agree that Fileutils use of these files is
> short-lived, but what about tar?

The code you saw in Fileutils 4.0 is working in Tar with no problems I
know about.  It allows to create on DOS/Windows tar archives which
state arbitrary user/group ownership.

> > > I think this is a better way to go. But how would we do it? We could
> > > add functions to create other users & groups on the fly, e.g.:
> > >
> > >     __add_user("brian", 123);
> > >     __add_group("root", 0);
> > 
> > Actually, I thought about changing getpwnam etc. so that it would not
> > reject users other than specified by $USER.  If so many programs which
> > use getpwnam and friends need to work around this, it's a sign that the
> > behavior is not useful.
> 
> I'm a bit confused - which behaviour would not be useful? Is the current
> behaviour not useful, because of necessary workarounds?

Yes, I meant libc functions getpwnam and friends.

The library functions (getpwnam etc.) return a failure indication if
the user/group they see is not the one they know about.  In effect,
they behave as a Unix system with only one known user and only one
known group: the current ones.  If the programs which actually use
those library functions need to work around that behavior, it probably
means that it (the behavior) is not very useful.

- Raw text -


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