Back to index

courier  0.68.2
Functions
sqwebpasswd.c File Reference
#include "config.h"
#include "auth.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>

Go to the source code of this file.

Functions

int authdaemondopasswd (char *, int)
int main ()

Function Documentation

int authdaemondopasswd ( char *  ,
int   
)

Here is the caller graph for this function:

int main ( )

Definition at line 23 of file sqwebpasswd.c.

{
       char buf[BUFSIZ];
       char *p;

       strcpy(buf,"PASSWD ");

       if (fgets(buf+7, sizeof(buf)-10, stdin) == NULL)
              exit(1);

       if ((p=strchr(buf, '\n')) != 0)
              *p=0;

       strcat(buf, "\n");
       signal(SIGPIPE, SIG_IGN);
       if (authdaemondopasswd(buf, sizeof(buf)))
       {
              sleep(5);
              exit(1);
       }
       exit(0);
       return (0);
}

Here is the call graph for this function: