This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: NSS prototypes


>>>>> Ulrich Drepper writes:

Uli> Thorsten Kukuk <kukuk@suse.de> writes:
>> I could use them, but struct __netgrent can only handle the case 
>> where you have one module in the /etc/nsswitch.conf netgroup line,
>> not more. One module will overwrite the data from the previous
>> module.

Uli> If you look closely you'll see that the reason why the structure is
Uli> passed to setnetgrent is to get around the problem of having a static
Uli> buffer and also to allow multi-threaded applications.  I remember that
Uli> the NIS stuff had some limitations but I think at least the
Uli> multi-threaded use should be possible.

The problem is not the purpose of the extra argument but how to use it
for *different* services without conflicts!  files-netgrp uses from
struct __netgrent the members private members - and therefore no other
service can use it since the same argument is passed to all services:
struct __netgrent {

[..]
  /* Room for the data kept between the calls to the netgroup
     functions.  We must avoid global variables.  */
  char *data;
  size_t data_size;
  char *cursor;
  int first;

  struct name_list *known_groups;
  struct name_list *needed_groups;
};

If Thorsten would implement accessing these fields in NIS, it would
break the service "files" :-(

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]