Package: nis Version: 3.17-31 Severity: normal Tags: patch *** Please type your report below this line ***
Hi, nis supports 32-bit uids pretty well but I discovered mknetid does not - it hard-codes a uid limit in the insert_user() function. This has the effect of ignoring all users with uid above the 16-bit limit, so the netid table that is created can be missing such users. A suggested fix is attached. It's quite ugly and probably needs reworking to make proper use of uid_t as well as some clever indexing to avoid blowing out the uid_liste[] array to 4Gbytes. But on a system with sufficient memory, it works. I expect this to be present in 3.17-32 as well. kind regards Vince --- nis-3.17/ypserv-2.19/mknetid/mknetid.h 2001-04-08 14:25:17.000000000 +0000 +++ mknetid.h 2013-05-02 05:05:43.000000000 +0000 @@ -24,4 +24,6 @@ extern void print_table(void); extern int add_group(const char *key, const char *grp); +#define MKNETID_MAX_UID 4294967295 /* 2**32 - 1 */ + #endif --- nis-3.17/ypserv-2.19/mknetid/netid_hash.c 2001-04-08 14:25:17.000000000 +0000 +++ netid_hash.c 2013-05-02 05:05:52.000000000 +0000 @@ -81,7 +81,7 @@ static hash_liste_t* user_liste[TABLESIZE]; static hash_liste_t* host_liste[TABLESIZE]; static int first = 1; -static char uid_liste[65535]; +static char uid_liste[MKNETID_MAX_UID]; static void init_table(void) @@ -103,7 +103,7 @@ id = atol(uid); - if(id > 65534) + if(id > (MKNETID_MAX_UID - 1)) return -2; if(uid_liste[id] == 1) -- Package-specific info: -- System Information: Debian Release: 6.0.7 APT prefers stable APT policy: (990, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages nis depends on: ii debconf [debconf-2.0] 1.5.36.1 Debian configuration management sy ii hostname 3.04 utility to set/show the host name ii libc6 2.11.3-4 Embedded GNU C Library: Shared lib ii libdbus-1-3 1.2.24-4+squeeze2 simple interprocess messaging syst ii libdbus-glib-1-2 0.88-2.1+squeeze1 simple interprocess messaging syst ii libgdbm3 1.8.3-9 GNU dbm database routines (runtime ii libglib2.0-0 2.24.2-1 The GLib library of C routines ii libslp1 1.2.1-7.8 OpenSLP libraries ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip ii make 3.81-8 An utility for Directing compilati ii netbase 4.45 Basic TCP/IP networking system ii portmap 6.0.0-2 RPC port mapper nis recommends no packages. Versions of packages nis suggests: pn nscd <none> (no description available) -- Configuration Files: /etc/ypserv.conf changed [not included] /var/yp/Makefile changed [not included] -- debconf information excluded -- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org