1Hi, 2 3this is a small patch to make taylor uucico 1.04 accept a "-L username" 4switch. It's similar to the "-l" switch (look into the documentation...) 5except that it will read the login name from the command line and not from 6stdin. Use it with taylor uucp "passwd" files and mgetty.login, calling 7"/usr/lib/uucp/uucico -L" directly. 8 9For Taylor UUCP 1.05, you don't need this patch anymore. 10 11gert 12 13*** uucico.c.orig Sat Nov 6 23:46:03 1993 14--- uucico.c Sun Nov 7 11:31:05 1993 15*************** 16*** 128,134 **** 17 boolean *pfcalled, enum tstatus_type *pterr)); 18 static int iuport_lock P((struct uuconf_port *qport, pointer pinfo)); 19 static boolean flogin_prompt P((pointer puuconf, 20! struct sconnection *qconn)); 21 static boolean faccept_call P((pointer puuconf, const char *zlogin, 22 struct sconnection *qconn, 23 const char **pzsystem)); 24--- 128,135 ---- 25 boolean *pfcalled, enum tstatus_type *pterr)); 26 static int iuport_lock P((struct uuconf_port *qport, pointer pinfo)); 27 static boolean flogin_prompt P((pointer puuconf, 28! struct sconnection *qconn, 29! char *zuser)); 30 static boolean faccept_call P((pointer puuconf, const char *zlogin, 31 struct sconnection *qconn, 32 const char **pzsystem)); 33*************** 34*** 161,166 **** 35--- 162,169 ---- 36 const char *zconfig = NULL; 37 /* -l: Whether to give a single login prompt. */ 38 boolean flogin = FALSE; 39+ /* -L: similar to -l, but prompt only for password, login name in optarg */ 40+ char *zloginuser = NULL; 41 /* -P port: port to use; in master mode, call out on this port. In 42 slave mode, accept logins on this port. If port not specified, 43 then in master mode figure it out for each system, and in slave 44*************** 45*** 185,191 **** 46 #endif 47 48 while ((iopt = getopt_long (argc, argv, 49! "cDefI:lp:qr:s:S:u:x:X:w", 50 asLongopts, (int *) NULL)) != EOF) 51 { 52 switch (iopt) 53--- 188,194 ---- 54 #endif 55 56 while ((iopt = getopt_long (argc, argv, 57! "cDefI:lL:p:qr:s:S:u:x:X:w", 58 asLongopts, (int *) NULL)) != EOF) 59 { 60 switch (iopt) 61*************** 62*** 222,227 **** 63--- 225,236 ---- 64 flogin = TRUE; 65 break; 66 67+ case 'L': 68+ /* prompt for password only */ 69+ flogin = TRUE; 70+ zloginuser = zbufcpy(optarg); 71+ break; 72+ 73 case 'p': 74 /* Port to use */ 75 zport = optarg; 76*************** 77*** 558,564 **** 78 if (fendless) 79 { 80 while (! FGOT_SIGNAL () 81! && flogin_prompt (puuconf, &sconn)) 82 { 83 /* Now ignore any SIGHUP that we got. */ 84 afSignal[INDEXSIG_SIGHUP] = FALSE; 85--- 567,573 ---- 86 if (fendless) 87 { 88 while (! FGOT_SIGNAL () 89! && flogin_prompt (puuconf, &sconn, zloginuser)) 90 { 91 /* Now ignore any SIGHUP that we got. */ 92 afSignal[INDEXSIG_SIGHUP] = FALSE; 93*************** 94*** 576,582 **** 95 else 96 { 97 if (flogin) 98! fret = flogin_prompt (puuconf, &sconn); 99 else 100 { 101 #if DEBUG > 1 102--- 585,591 ---- 103 else 104 { 105 if (flogin) 106! fret = flogin_prompt (puuconf, &sconn, zloginuser); 107 else 108 { 109 #if DEBUG > 1 110*************** 111*** 666,671 **** 112--- 675,682 ---- 113 fprintf (stderr, 114 " -l: prompt for login name and password\n"); 115 fprintf (stderr, 116+ " -L user: set login name to user, prompt for password\n"); 117+ fprintf (stderr, 118 " -e: Endless loop of login prompts and daemon execution\n"); 119 fprintf (stderr, 120 " -w: After calling out, wait for incoming calls\n"); 121*************** 122*** 1495,1512 **** 123 /* Prompt for a login name and a password, and run as the slave. */ 124 125 static boolean 126! flogin_prompt (puuconf, qconn) 127 pointer puuconf; 128 struct sconnection *qconn; 129 { 130! char *zuser, *zpass; 131 boolean fret; 132 int iuuconf; 133 134 DEBUG_MESSAGE0 (DEBUG_HANDSHAKE, "flogin_prompt: Waiting for login"); 135 136! zuser = NULL; 137! do 138 { 139 ubuffree (zuser); 140 if (! fconn_write (qconn, "login: ", sizeof "login: " - 1)) 141--- 1506,1524 ---- 142 /* Prompt for a login name and a password, and run as the slave. */ 143 144 static boolean 145! flogin_prompt (puuconf, qconn, zuser) 146 pointer puuconf; 147 struct sconnection *qconn; 148+ char *zuser; 149 { 150! char *zpass; 151 boolean fret; 152 int iuuconf; 153 154 DEBUG_MESSAGE0 (DEBUG_HANDSHAKE, "flogin_prompt: Waiting for login"); 155 156! if ( zuser == NULL || *zuser == '\0') 157! do 158 { 159 ubuffree (zuser); 160 if (! fconn_write (qconn, "login: ", sizeof "login: " - 1)) 161