s/qmail 4.2.29a
Next generation secure email transport
Loading...
Searching...
No Matches
Macros | Functions | Variables
qmail-qmaint.c File Reference
#include <unistd.h>
#include <sys/stat.h>
#include <pwd.h>
#include <grp.h>
#include "stralloc.h"
#include "direntry.h"
#include "fmt.h"
#include "fmtqfn.h"
#include "error.h"
#include "buffer.h"
#include "getln.h"
#include "str.h"
#include "open.h"
#include "fifo.h"
#include "scan.h"
#include "readsubdir.h"
#include "logmsg.h"
#include "exit.h"
#include "auto_qmail.h"
#include "auto_split.h"
#include "auto_uids.h"
Include dependency graph for qmail-qmaint.c:

Go to the source code of this file.

Macros

#define WHO   "qmail-qmaint"
 
#define DIRS   logmsg(WHO,0,WARN,"It looks like some directories don't exist, should I create them? (Y/n)")
 
#define FILES   logmsg(WHO,0,WARN,"It looks like some files don't exist, should I create them? (Y/n)")
 
#define PERMS   logmsg(WHO,0,WARN,B("It looks like permissions are wrong for ",name," should I fix them? (Y/n)"))
 
#define CPERMS   logmsg(WHO,0,WARN,B("Changing permissions: ",name," => ",pnum))
 
#define OWNER   logmsg(WHO,0,WARN,B("It looks like ownerships are wrong for ",name," should I fix them? (Y/n)"))
 
#define COWNER   logmsg(WHO,0,WARN,B("Changing ownership: ",name," => ",unum,"/",gnum))
 

Functions

void die_make (char *name)
 
void die_user (char *user)
 
void die_group (char *group)
 
void die_check ()
 
void die_recon ()
 
void die_nomem ()
 
int confirm ()
 
int check_item (char *name, int uid, int gid, int perm, char type, int size)
 
int check_files (char *directory, int uid, int gid, int perm)
 
void warn_files (char *directory)
 
int check_splits (char *directory, int dir_uid, int dir_gid, int dir_perm, int file_gid, int file_perm)
 
int rename_mess (char *dir, char *part, char *new_part, char *old_filename, char *new_filename)
 
int fix_part (char *part)
 
int fix_names ()
 
int check_dirs ()
 
void fnmake_init ()
 
void fnmake_local (unsigned long id)
 
void fnmake_remote (unsigned long id)
 
void fnmake_mess (unsigned long id)
 
void fnmake_dkim (unsigned long id)
 
void fnmake_info (unsigned long id)
 
void fnmake_bounce (unsigned long id)
 
void warn_unlink (unsigned long id)
 
void err_unlink (unsigned long id)
 
void err_chdir ()
 
int delete_msg (unsigned long id)
 
int main (int argc, char **argv)
 

Variables

stralloc queue_dir = {0}
 
stralloc check_dir = {0}
 
stralloc temp_dirname = {0}
 
stralloc temp_filename = {0}
 
stralloc old_name = {0}
 
stralloc new_name = {0}
 
stralloc mess_dir = {0}
 
stralloc query = {0}
 
char strnum [FMT_ULONG]
 
int flag_interactive = 0
 
int flag_dircreate = 0
 
int flag_filecreate = 0
 
int flag_permfix = 0
 
int flag_namefix = 0
 
int flag_delete = 0
 
int qmailq_uid
 
int qmails_uid
 
int qmailr_uid
 
int qmail_gid
 
int split_num
 
stralloc fn = {0}
 

Macro Definition Documentation

◆ COWNER

#define COWNER   logmsg(WHO,0,WARN,B("Changing ownership: ",name," => ",unum,"/",gnum))

Definition at line 102 of file qmail-qmaint.c.

◆ CPERMS

#define CPERMS   logmsg(WHO,0,WARN,B("Changing permissions: ",name," => ",pnum))

Definition at line 99 of file qmail-qmaint.c.

◆ DIRS

#define DIRS   logmsg(WHO,0,WARN,"It looks like some directories don't exist, should I create them? (Y/n)")

Definition at line 95 of file qmail-qmaint.c.

◆ FILES

#define FILES   logmsg(WHO,0,WARN,"It looks like some files don't exist, should I create them? (Y/n)")

Definition at line 96 of file qmail-qmaint.c.

◆ OWNER

#define OWNER   logmsg(WHO,0,WARN,B("It looks like ownerships are wrong for ",name," should I fix them? (Y/n)"))

Definition at line 101 of file qmail-qmaint.c.

◆ PERMS

#define PERMS   logmsg(WHO,0,WARN,B("It looks like permissions are wrong for ",name," should I fix them? (Y/n)"))

Definition at line 98 of file qmail-qmaint.c.

◆ WHO

#define WHO   "qmail-qmaint"

Definition at line 26 of file qmail-qmaint.c.

Function Documentation

◆ check_dirs()

int check_dirs ( )

Definition at line 393 of file qmail-qmaint.c.

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

◆ check_files()

int check_files ( char *  directory,
int  uid,
int  gid,
int  perm 
)

Definition at line 217 of file qmail-qmaint.c.

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

◆ check_item()

int check_item ( char *  name,
int  uid,
int  gid,
int  perm,
char  type,
int  size 
)

Definition at line 104 of file qmail-qmaint.c.

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

◆ check_splits()

int check_splits ( char *  directory,
int  dir_uid,
int  dir_gid,
int  dir_perm,
int  file_gid,
int  file_perm 
)

Definition at line 258 of file qmail-qmaint.c.

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

◆ confirm()

int confirm ( )

Definition at line 83 of file qmail-qmaint.c.

Here is the caller graph for this function:

◆ delete_msg()

int delete_msg ( unsigned long  id)

Definition at line 512 of file qmail-qmaint.c.

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

◆ die_check()

void die_check ( )

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

Here is the caller graph for this function:

◆ die_group()

void die_group ( char *  group)

Definition at line 61 of file qmail-qmaint.c.

◆ die_make()

void die_make ( char *  name)

Definition at line 51 of file qmail-qmaint.c.

Here is the caller graph for this function:

◆ die_nomem()

void die_nomem ( void  )

Definition at line 76 of file qmail-qmaint.c.

Here is the caller graph for this function:

◆ die_recon()

void die_recon ( )

Definition at line 71 of file qmail-qmaint.c.

◆ die_user()

void die_user ( char *  user)

Definition at line 56 of file qmail-qmaint.c.

◆ err_chdir()

void err_chdir ( )

Definition at line 507 of file qmail-qmaint.c.

Here is the caller graph for this function:

◆ err_unlink()

void err_unlink ( unsigned long  id)

Definition at line 500 of file qmail-qmaint.c.

Here is the caller graph for this function:

◆ fix_names()

int fix_names ( )

Definition at line 377 of file qmail-qmaint.c.

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

◆ fix_part()

int fix_part ( char *  part)

Definition at line 324 of file qmail-qmaint.c.

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

◆ fnmake_bounce()

void fnmake_bounce ( unsigned long  id)

Definition at line 491 of file qmail-qmaint.c.

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

◆ fnmake_dkim()

void fnmake_dkim ( unsigned long  id)

Definition at line 489 of file qmail-qmaint.c.

Here is the call graph for this function:

◆ fnmake_info()

void fnmake_info ( unsigned long  id)

Definition at line 490 of file qmail-qmaint.c.

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

◆ fnmake_init()

void fnmake_init ( void  )

Definition at line 485 of file qmail-qmaint.c.

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

◆ fnmake_local()

void fnmake_local ( unsigned long  id)

Definition at line 486 of file qmail-qmaint.c.

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

◆ fnmake_mess()

void fnmake_mess ( unsigned long  id)

Definition at line 488 of file qmail-qmaint.c.

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

◆ fnmake_remote()

void fnmake_remote ( unsigned long  id)

Definition at line 487 of file qmail-qmaint.c.

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

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 552 of file qmail-qmaint.c.

Here is the call graph for this function:

◆ rename_mess()

int rename_mess ( char *  dir,
char *  part,
char *  new_part,
char *  old_filename,
char *  new_filename 
)

Definition at line 291 of file qmail-qmaint.c.

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

◆ warn_files()

void warn_files ( char *  directory)

Definition at line 237 of file qmail-qmaint.c.

Here is the caller graph for this function:

◆ warn_unlink()

void warn_unlink ( unsigned long  id)

Definition at line 493 of file qmail-qmaint.c.

Here is the caller graph for this function:

Variable Documentation

◆ check_dir

stralloc check_dir = {0}

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

◆ flag_delete

int flag_delete = 0

Definition at line 43 of file qmail-qmaint.c.

◆ flag_dircreate

int flag_dircreate = 0

Definition at line 39 of file qmail-qmaint.c.

◆ flag_filecreate

int flag_filecreate = 0

Definition at line 40 of file qmail-qmaint.c.

◆ flag_interactive

int flag_interactive = 0

Definition at line 38 of file qmail-qmaint.c.

◆ flag_namefix

int flag_namefix = 0

Definition at line 42 of file qmail-qmaint.c.

◆ flag_permfix

int flag_permfix = 0

Definition at line 41 of file qmail-qmaint.c.

◆ fn

stralloc fn = {0}

Definition at line 483 of file qmail-qmaint.c.

◆ mess_dir

stralloc mess_dir = {0}

Definition at line 34 of file qmail-qmaint.c.

◆ new_name

stralloc new_name = {0}

Definition at line 33 of file qmail-qmaint.c.

◆ old_name

stralloc old_name = {0}

Definition at line 32 of file qmail-qmaint.c.

◆ qmail_gid

int qmail_gid

Definition at line 48 of file qmail-qmaint.c.

◆ qmailq_uid

int qmailq_uid

Definition at line 45 of file qmail-qmaint.c.

◆ qmailr_uid

int qmailr_uid

Definition at line 47 of file qmail-qmaint.c.

◆ qmails_uid

int qmails_uid

Definition at line 46 of file qmail-qmaint.c.

◆ query

stralloc query = {0}

Definition at line 35 of file qmail-qmaint.c.

◆ queue_dir

stralloc queue_dir = {0}

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

◆ split_num

int split_num

Definition at line 49 of file qmail-qmaint.c.

◆ strnum

char strnum[FMT_ULONG]

Definition at line 37 of file qmail-qmaint.c.

◆ temp_dirname

stralloc temp_dirname = {0}

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

◆ temp_filename

stralloc temp_filename = {0}

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