]>
git.saurik.com Git - apple/system_cmds.git/blob - chpass.tproj/directory_service.h
4c5c606ec3d0bd30967871303dcc9f77d99e8f1e
1 #ifndef _DIRECTORY_SERVICE_H_
2 #define _DIRECTORY_SERVICE_H_
12 #include <DirectoryService/DirectoryService.h>
14 /*---------------------------------------------------------------------------
15 * Convenience macros: to be used to provide a cleanup section (eg, to
16 * deallocate memory, etc). IF, CLEANUP and ENDIF must always be used, and
17 * must be used with braces; ELSE is optional, but must also be used with
28 * "break" may be used in the IF section to exit the block prematurely; the
29 * CLEANUP section will still be performed. "break" in the CLEANUP and ELSE
30 * sections apply to higher level blocks.
31 *---------------------------------------------------------------------------*/
32 #define IF(x) if(x) { do
33 #define CLEANUP while(0);
37 /*---------------------------------------------------------------------------
38 * Error codes (not including DirectoryService error codes and standard error
40 *---------------------------------------------------------------------------*/
41 #define E_NOTFOUND -1000
42 #define E_NOGLOBALCONFIG -1001
43 #define E_NOLOOKUPORDER -1002
44 #define E_POPENFAILED -1003
45 #define E_CHILDFAILED -1004
46 #define E_DATALISTOUTOFMEM -1005
47 #define E_PATHOUTOFMEM -1006
48 #define E_NICLFAILED -1007
50 /*---------------------------------------------------------------------------
51 * Success return values from wherepwent()
52 *---------------------------------------------------------------------------*/
61 /*---------------------------------------------------------------------------
63 *---------------------------------------------------------------------------*/
65 extern const char MasterPasswd
[];
67 /*---------------------------------------------------------------------------
69 *---------------------------------------------------------------------------*/
70 extern void setrestricted(int where
, struct passwd
*pw
);
71 extern void update_local_ni(struct passwd
*pworig
, struct passwd
*pw
);
72 extern int wherepwent(const char *name
);
74 #endif /* _DIRECTORY_SERVICE_H_ */