~ubuntu-branches/debian/squeeze/alpine/squeeze

« back to all changes in this revision

Viewing changes to imap/src/osdep/unix/env_unix.h

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ========================================================================
 
2
 * Copyright 1988-2006 University of Washington
 
3
 *
 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * You may obtain a copy of the License at
 
7
 *
 
8
 *     http://www.apache.org/licenses/LICENSE-2.0
 
9
 *
 
10
 * 
 
11
 * ========================================================================
 
12
 */
 
13
 
 
14
/*
 
15
 * Program:     UNIX environment routines
 
16
 *
 
17
 * Author:      Mark Crispin
 
18
 *              Networks and Distributed Computing
 
19
 *              Computing & Communications
 
20
 *              University of Washington
 
21
 *              Administration Building, AG-44
 
22
 *              Seattle, WA  98195
 
23
 *              Internet: MRC@CAC.Washington.EDU
 
24
 *
 
25
 * Date:        1 August 1988
 
26
 * Last Edited: 30 August 2006
 
27
 */
 
28
 
 
29
 
 
30
typedef struct dotlock_base {
 
31
  char lock[MAILTMPLEN];
 
32
  int pipei;
 
33
  int pipeo;
 
34
} DOTLOCK;
 
35
 
 
36
 
 
37
/* Bits that can be set in restrictBox */
 
38
 
 
39
#define RESTRICTROOT 0x1        /* restricted box doesn't allow root */
 
40
#define RESTRICTOTHERUSER 0x2   /* restricted box doesn't allow other user */
 
41
 
 
42
/* Subscription definitions for UNIX */
 
43
 
 
44
#define SUBSCRIPTIONFILE(t) sprintf (t,"%s/.mailboxlist",myhomedir ())
 
45
#define SUBSCRIPTIONTEMP(t) sprintf (t,"%s/.mlbxlsttmp",myhomedir ())
 
46
 
 
47
 
 
48
/* dorc() options */
 
49
 
 
50
#define SYSCONFIG "/etc/c-client.cf"
 
51
 
 
52
 
 
53
/* Special users */
 
54
 
 
55
#define ANONYMOUSUSER "nobody"  /* anonymous user */
 
56
#define UNLOGGEDUSER "root"     /* unlogged-in user */
 
57
#define ADMINGROUP "mailadm"    /* mail administrator group */
 
58
 
 
59
/* Function prototypes */
 
60
 
 
61
#include "env.h"
 
62
 
 
63
void rfc822_fixed_date (char *date);
 
64
long env_init (char *user,char *home);
 
65
char *myusername_full (unsigned long *flags);
 
66
#define MU_LOGGEDIN 0
 
67
#define MU_NOTLOGGEDIN 1
 
68
#define MU_ANONYMOUS 2
 
69
#define myusername() \
 
70
  myusername_full (NIL)
 
71
char *sysinbox ();
 
72
char *mailboxdir (char *dst,char *dir,char *name);
 
73
long dotlock_lock (char *file,DOTLOCK *base,int fd);
 
74
long dotlock_unlock (DOTLOCK *base);
 
75
int lockname (char *lock,char *fname,int op,long *pid);
 
76
int lockfd (int fd,char *lock,int op);
 
77
int lock_work (char *lock,void *sbuf,int op,long *pid);
 
78
long chk_notsymlink (char *name,void *sbuf);
 
79
void unlockfd (int fd,char *lock);
 
80
long set_mbx_protections (char *mailbox,char *path);
 
81
long get_dir_protection (char *mailbox);
 
82
MAILSTREAM *user_flags (MAILSTREAM *stream);
 
83
char *default_user_flag (unsigned long i);
 
84
void dorc (char *file,long flag);
 
85
long path_create (MAILSTREAM *stream,char *mailbox);
 
86
void grim_pid_reap_status (int pid,int killreq,void *status);
 
87
#define grim_pid_reap(pid,killreq) \
 
88
  grim_pid_reap_status (pid,killreq,NIL)
 
89
long safe_write (int fd,char *buf,long nbytes);
 
90
void *arm_signal (int sig,void *action);
 
91
struct passwd *checkpw (struct passwd *pw,char *pass,int argc,char *argv[]);
 
92
long loginpw (struct passwd *pw,int argc,char *argv[]);
 
93
long pw_login (struct passwd *pw,char *auser,char *user,char *home,int argc,
 
94
               char *argv[]);
 
95
void *mm_blocknotify (int reason,void *data);