Changed auth_server() to take two fds (for the daemon via remote-shell
authorWayne Davison <wayned@samba.org>
Thu, 1 Aug 2002 00:36:54 +0000 (00:36 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 1 Aug 2002 00:36:54 +0000 (00:36 +0000)
support).

authenticate.c

index d2b74cd..7d44da6 100644 (file)
@@ -203,7 +203,7 @@ static void generate_hash(char *in, char *challenge, char *out)
 
    otherwise return username
 */
 
    otherwise return username
 */
-char *auth_server(int fd, int module, char *addr, char *leader)
+char *auth_server(int f_in, int f_out, int module, char *addr, char *leader)
 {
        char *users = lp_auth_users(module);
        char challenge[16];
 {
        char *users = lp_auth_users(module);
        char challenge[16];
@@ -222,9 +222,9 @@ char *auth_server(int fd, int module, char *addr, char *leader)
        
        base64_encode(challenge, 16, b64_challenge);
 
        
        base64_encode(challenge, 16, b64_challenge);
 
-       io_printf(fd,"%s%s\n", leader, b64_challenge);
+       io_printf(f_out, "%s%s\n", leader, b64_challenge);
 
 
-       if (!read_line(fd, line, sizeof(line)-1)) {
+       if (!read_line(f_in, line, sizeof(line)-1)) {
                return NULL;
        }
 
                return NULL;
        }