home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1504 < prev    next >
Encoding:
Internet Message Format  |  1990-12-28  |  4.5 KB

  1. From: lenny@icus.ICUS.COM (Lenny Tropiano)
  2. Newsgroups: unix-pc.sources,alt.sources
  3. Subject: dpasswd: Dialup Password Administration/Version 2.1.1 (Patch2)
  4. Message-ID: <1210@icus.ICUS.COM>
  5. Date: 24 Jun 90 14:53:58 GMT
  6.  
  7. Small patch to dpasswd, that will allow terminal names other than /dev/ttyNNN
  8. to be specified.  If your terminals are in that form, this patch is of low
  9. priority.  But under SVR4.0, someone told me that his terminals are /dev/term/0,
  10. /dev/term/1 ... /dev/term/N.  Of course one could make a link (ln) to /dev/ttyN
  11. but I felt it could easily be changed in the program.  I just now restrict
  12. the terminal port not to start with "/dev/" so that I can append /dev/ to 
  13. whatever you give.  All terminals ports under any version of UNIX *should* be
  14. in the /dev directory.
  15.  
  16. -Lenny
  17.  
  18. --- cut here for patch --- --- cut here for patch --- --- cut here for patch ---
  19.  
  20. *** old/dpasswd.c    Sun Jun 24 10:34:19 1990
  21. --- dpasswd.c    Sun Jun 24 10:44:30 1990
  22. ***************
  23. *** 8,13
  24.   **               May 16, 1990          [Version 1.6]                    **
  25.   **               June 16, 1990         [Version 2.0]                    **
  26.   **               June 18, 1990         [Version 2.1]                    **
  27.   **                                                                      **
  28.   ** Modified by Gary Butler, ST, Pacific Bell [1.6]                      **
  29.   ** Modified by Joe Wasik, ST, Pacific Bell   [1.6]                      **
  30.  
  31. --- 8,14 -----
  32.   **               May 16, 1990          [Version 1.6]                    **
  33.   **               June 16, 1990         [Version 2.0]                    **
  34.   **               June 18, 1990         [Version 2.1]                    **
  35. + **               June 24, 1990         [Version 2.1.1]                  **
  36.   **                                                                      **
  37.   ** Modified by Gary Butler, ST, Pacific Bell [1.6]                      **
  38.   ** Modified by Joe Wasik, ST, Pacific Bell   [1.6]                      **
  39. ***************
  40. *** 11,17
  41.   **                                                                      **
  42.   ** Modified by Gary Butler, ST, Pacific Bell [1.6]                      **
  43.   ** Modified by Joe Wasik, ST, Pacific Bell   [1.6]                      **
  44. ! ** Modified by Lenny Tropiano, ICUS Software Systems [2.0, 2.1]         **
  45.   **                                                                      **
  46.   **************************************************************************
  47.   **                                                                      **
  48.  
  49. --- 12,18 -----
  50.   **                                                                      **
  51.   ** Modified by Gary Butler, ST, Pacific Bell [1.6]                      **
  52.   ** Modified by Joe Wasik, ST, Pacific Bell   [1.6]                      **
  53. ! ** Modified by Lenny Tropiano, ICUS Software Systems [2.0, 2.1, 2.1.1]  **
  54.   **                                                                      **
  55.   **************************************************************************
  56.   **                                                                      **
  57. ***************
  58. *** 128,133
  59.   ** 1 -    If no arguments are given, dialup password'ed shells and ttys are
  60.   **        displayed.
  61.   **
  62.   */
  63.   
  64.   #include <stdio.h>
  65.  
  66. --- 129,146 -----
  67.   ** 1 -    If no arguments are given, dialup password'ed shells and ttys are
  68.   **        displayed.
  69.   **
  70. + ** June 24, 1990
  71. + **
  72. + ** Bug Fix/Suggestion:
  73. + **
  74. + ** 1 -    As suggested to me by Lars Tunkrans (lars@iclswe.icl.se) that all
  75. + **        terminal ports aren't always /dev/ttyNN, but under SVR4.0 his ports
  76. + **      are /dev/term/0, /dev/term/1.  He suggested that I require the full
  77. + **      path to the device, I decided just not to require the first "/dev/"
  78. + **      prefix to the path, since all devices *should* be in /dev/... and if
  79. + **      it isn't, a local hack would be to change the strncmp() call on 
  80. + **      line 279.
  81. + **
  82.   */
  83.   
  84.   #include <stdio.h>
  85. ***************
  86. *** 264,270
  87.               null = 1;
  88.               break;
  89.           case 't':
  90. !             if (strchr(optarg, '/') == NULL) {
  91.               chgterm = 1;
  92.               (void) sprintf(terminal, "/dev/%s", optarg);
  93.               } else
  94.  
  95. --- 277,283 -----
  96.               null = 1;
  97.               break;
  98.           case 't':
  99. !             if (strncmp(optarg, "/dev/", 5) != 0) {
  100.               chgterm = 1;
  101.               (void) sprintf(terminal, "/dev/%s", optarg);
  102.               } else
  103. -- 
  104. | Lenny Tropiano           ICUS Software Systems        lenny@icus.ICUS.COM |
  105. | {ames,pacbell,decuac,sbcs,hombre,rayssd}!icus!lenny   attmail!icus!lenny  |
  106. +------ ICUS Software Systems --  PO Box 1;  Islip Terrace, NY  11752 ------+
  107.