From: lenny@icus.ICUS.COM (Lenny Tropiano) Newsgroups: unix-pc.sources,alt.sources Subject: dpasswd: Dialup Password Administration/Version 2.1.1 (Patch2) Message-ID: <1210@icus.ICUS.COM> Date: 24 Jun 90 14:53:58 GMT Small patch to dpasswd, that will allow terminal names other than /dev/ttyNNN to be specified. If your terminals are in that form, this patch is of low priority. But under SVR4.0, someone told me that his terminals are /dev/term/0, /dev/term/1 ... /dev/term/N. Of course one could make a link (ln) to /dev/ttyN but I felt it could easily be changed in the program. I just now restrict the terminal port not to start with "/dev/" so that I can append /dev/ to whatever you give. All terminals ports under any version of UNIX *should* be in the /dev directory. -Lenny --- cut here for patch --- --- cut here for patch --- --- cut here for patch --- *** old/dpasswd.c Sun Jun 24 10:34:19 1990 --- dpasswd.c Sun Jun 24 10:44:30 1990 *************** *** 8,13 ** May 16, 1990 [Version 1.6] ** ** June 16, 1990 [Version 2.0] ** ** June 18, 1990 [Version 2.1] ** ** ** ** Modified by Gary Butler, ST, Pacific Bell [1.6] ** ** Modified by Joe Wasik, ST, Pacific Bell [1.6] ** --- 8,14 ----- ** May 16, 1990 [Version 1.6] ** ** June 16, 1990 [Version 2.0] ** ** June 18, 1990 [Version 2.1] ** + ** June 24, 1990 [Version 2.1.1] ** ** ** ** Modified by Gary Butler, ST, Pacific Bell [1.6] ** ** Modified by Joe Wasik, ST, Pacific Bell [1.6] ** *************** *** 11,17 ** ** ** Modified by Gary Butler, ST, Pacific Bell [1.6] ** ** Modified by Joe Wasik, ST, Pacific Bell [1.6] ** ! ** Modified by Lenny Tropiano, ICUS Software Systems [2.0, 2.1] ** ** ** ************************************************************************** ** ** --- 12,18 ----- ** ** ** Modified by Gary Butler, ST, Pacific Bell [1.6] ** ** Modified by Joe Wasik, ST, Pacific Bell [1.6] ** ! ** Modified by Lenny Tropiano, ICUS Software Systems [2.0, 2.1, 2.1.1] ** ** ** ************************************************************************** ** ** *************** *** 128,133 ** 1 - If no arguments are given, dialup password'ed shells and ttys are ** displayed. ** */ #include --- 129,146 ----- ** 1 - If no arguments are given, dialup password'ed shells and ttys are ** displayed. ** + ** June 24, 1990 + ** + ** Bug Fix/Suggestion: + ** + ** 1 - As suggested to me by Lars Tunkrans (lars@iclswe.icl.se) that all + ** terminal ports aren't always /dev/ttyNN, but under SVR4.0 his ports + ** are /dev/term/0, /dev/term/1. He suggested that I require the full + ** path to the device, I decided just not to require the first "/dev/" + ** prefix to the path, since all devices *should* be in /dev/... and if + ** it isn't, a local hack would be to change the strncmp() call on + ** line 279. + ** */ #include *************** *** 264,270 null = 1; break; case 't': ! if (strchr(optarg, '/') == NULL) { chgterm = 1; (void) sprintf(terminal, "/dev/%s", optarg); } else --- 277,283 ----- null = 1; break; case 't': ! if (strncmp(optarg, "/dev/", 5) != 0) { chgterm = 1; (void) sprintf(terminal, "/dev/%s", optarg); } else -- | Lenny Tropiano ICUS Software Systems lenny@icus.ICUS.COM | | {ames,pacbell,decuac,sbcs,hombre,rayssd}!icus!lenny attmail!icus!lenny | +------ ICUS Software Systems -- PO Box 1; Islip Terrace, NY 11752 ------+