RFC: NSS prototypes
Andreas Jaeger
aj@suse.de
Mon Dec 18 08:56:00 GMT 2000
>>>>> 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
More information about the Libc-hacker
mailing list