s/qmail 4.3.24
Next generation secure email transport
Loading...
Searching...
No Matches
qmail-authuser.c File Reference

user authentication for qmail-smtpd/qmail-pop3d,bincimapd More...

#include <unistd.h>
#include "global.h"
#include "stralloc.h"
#include "buffer.h"
#include "auto_qmail.h"
#include "case.h"
#include "control.h"
#include "constmap.h"
#include "str.h"
#include "fmt.h"
#include "fd.h"
#include "open.h"
#include "byte.h"
#include "scan.h"
#include "md5.h"
#include "hmac_md5.h"
#include "sha1.h"
#include "sha256.h"
#include "pathexec.h"
#include "prot.h"
#include "wait.h"
#include "sig.h"
#include "error.h"
#include "env.h"
#include "qmail.h"
#include <pwd.h>
#include "hasspnam.h"
#include "hasuserpw.h"
Include dependency graph for qmail-authuser.c:

Go to the source code of this file.

Macros

#define FDAUTH   3
#define FDGOSSIP   1
#define SOCKET_CALL   "-s"
#define DOVECOT_SERVICE   "-x"
#define AUTHSLEEP   5

Functions

char * crypt (const char *, const char *)
void exit (int fail)
 Supported storage methods: (1) authuser:[=]plainpasswd, (2) authuser:hashpasswd, (3) authuser:?, authuser:!, *:?, *:! (! -> +environment) (4) x:+ -> checkvpw; x = { user@domain, @domain, @ } vmailmgr (5) x:& -> vchkpw; x = { user@domain, @domain, @ } vpopmail (6) x:= -> qmail-client; x = { user@domain, @domain, @ } dovecot Supported auth methods: user/login/plain: (1,2,3,4,5,6), cram-md5/apop: (1,5).
int main (int argc, char *const argv[])

Variables

char authbuf [BUFSIZE_AUTH]
buffer ba = BUFFER_INIT(buffer_unixwrite,FDAUTH,authbuf,sizeof(authbuf))
struct constmap mapauthuser
stralloc authfile = {0}
stralloc disabled = {0}
stralloc user = {0}
stralloc homedir = {0}
stralloc shell = {0}

Detailed Description

user authentication for qmail-smtpd/qmail-pop3d,bincimapd

Returns
0: ok 1: credentials failure 2: qmail-authuser is misused 110: can't read controls 111: temporary problem checking the password

Definition in file qmail-authuser.c.

Macro Definition Documentation

◆ AUTHSLEEP

#define AUTHSLEEP   5

Definition at line 31 of file qmail-authuser.c.

◆ DOVECOT_SERVICE

#define DOVECOT_SERVICE   "-x"

Definition at line 30 of file qmail-authuser.c.

◆ FDAUTH

#define FDAUTH   3

Definition at line 27 of file qmail-authuser.c.

◆ FDGOSSIP

#define FDGOSSIP   1

Definition at line 28 of file qmail-authuser.c.

◆ SOCKET_CALL

#define SOCKET_CALL   "-s"

Definition at line 29 of file qmail-authuser.c.

Function Documentation

◆ crypt()

char * crypt ( const char * ,
const char *  )
extern

◆ exit()

void exit ( int fail)

Supported storage methods: (1) authuser:[=]plainpasswd, (2) authuser:hashpasswd, (3) authuser:?, authuser:!, *:?, *:! (! -> +environment) (4) x:+ -> checkvpw; x = { user@domain, @domain, @ } vmailmgr (5) x:& -> vchkpw; x = { user@domain, @domain, @ } vpopmail (6) x:= -> qmail-client; x = { user@domain, @domain, @ } dovecot Supported auth methods: user/login/plain: (1,2,3,4,5,6), cram-md5/apop: (1,5).

Definition at line 82 of file qmail-authuser.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int argc,
char *const argv[] )

Definition at line 294 of file qmail-authuser.c.

Here is the call graph for this function:

Variable Documentation

◆ authbuf

char authbuf[BUFSIZE_AUTH]

Definition at line 59 of file qmail-authuser.c.

◆ authfile

stralloc authfile = {0}

Definition at line 63 of file qmail-authuser.c.

◆ ba

buffer ba = BUFFER_INIT(buffer_unixwrite,FDAUTH,authbuf,sizeof(authbuf))

Definition at line 60 of file qmail-authuser.c.

◆ disabled

stralloc disabled = {0}

Definition at line 64 of file qmail-authuser.c.

◆ homedir

stralloc homedir = {0}

Definition at line 66 of file qmail-authuser.c.

◆ mapauthuser

struct constmap mapauthuser

Definition at line 62 of file qmail-authuser.c.

◆ shell

stralloc shell = {0}

Definition at line 67 of file qmail-authuser.c.

◆ user

stralloc user = {0}

Definition at line 65 of file qmail-authuser.c.