Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdcsvax.UUCP Path: utzoo!linus!philabs!mcnc!decvax!ittvax!dcdwest!sdcsvax!laman From: laman@sdcsvax.UUCP Newsgroups: net.bugs,net.bugs.usg Subject: Bug in System V and System V.2 login.c Message-ID: <663@sdcsvax.UUCP> Date: Wed, 11-Apr-84 13:16:25 EST Article-I.D.: sdcsvax.663 Posted: Wed Apr 11 13:16:25 1984 Date-Received: Fri, 13-Apr-84 01:47:58 EST Organization: EECS Dept., U.C. San Diego Lines: 32 There is a bug in both System V and SystemV.2 login.c programs. There are two calls to strncmp with ONLY TWO arguments in terminal(). We changed ours to "strcmp". You can change yours by adding a sizeof for the third argument. Either way will suffice. A contextual diff follows. *** login.c Wed Apr 11 12:21:58 1984 --- oldlogin.c Wed Apr 11 12:21:23 1984 *************** *** 563,570 continue; if(pass1 && db.d_ino != fsb.st_ino) continue; ! if (strcmp(&db.d_name[0],"syscon") == 0 || ! strcmp(&db.d_name[0],"systty") == 0) continue; (void) strcpy(rbuf, dev); (void) strcat(rbuf, db.d_name); --- 563,570 ----- continue; if(pass1 && db.d_ino != fsb.st_ino) continue; ! if (strncmp(&db.d_name[0],"syscon") == 0 || ! strncmp(&db.d_name[0],"systty") == 0) continue; (void) strcpy(rbuf, dev); (void) strcat(rbuf, db.d_name); Mike Laman UUCP: {ucbvax,philabs,sdccsu3,sdcsla}!sdcsvax!laman