summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2001-05-04 15:44:27 +0000
committerJean-François Micouleau <jfm@samba.org>2001-05-04 15:44:27 +0000
commitf35157f39293f9fa240a28642c41708b55d301c8 (patch)
treecd0eb02e9b316899d2cfb9b8cc2784ad739c60a5 /source3/include
parent1f7a451c1e059b5a86e1e78debd582579aa7bcb7 (diff)
downloadsamba-f35157f39293f9fa240a28642c41708b55d301c8.tar.gz
samba-f35157f39293f9fa240a28642c41708b55d301c8.tar.bz2
samba-f35157f39293f9fa240a28642c41708b55d301c8.zip
Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the password changing. So don't cry ;-) J.F. (This used to be commit a4a4c02b12f030a3b9e6225b999c90689dfc4719)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/mapping.h4
-rw-r--r--source3/include/proto.h37
-rw-r--r--source3/include/smb.h41
3 files changed, 42 insertions, 40 deletions
diff --git a/source3/include/mapping.h b/source3/include/mapping.h
index 2543f6e42a..f3e0be6e4a 100644
--- a/source3/include/mapping.h
+++ b/source3/include/mapping.h
@@ -42,3 +42,7 @@ typedef struct _PRIVS {
#define SE_PRIV_ALL 0xffff
#define PRIV_ALL_INDEX 4
+
+
+#define ENUM_ONLY_MAPPED True
+#define ENUM_ALL_MAPPED False
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 98922a06f9..daa393e0e1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -29,7 +29,8 @@ BOOL get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map);
BOOL get_group_map_from_gid(gid_t gid, GROUP_MAP *map);
BOOL get_group_map_from_ntname(char *name, GROUP_MAP *map);
BOOL group_map_remove(DOM_SID sid);
-BOOL enum_group_mapping(enum SID_NAME_USE sid_name_use, GROUP_MAP **rmap, int *num_entries);
+BOOL enum_group_mapping(enum SID_NAME_USE sid_name_use, GROUP_MAP **rmap,
+ int *num_entries, BOOL unix_only);
void convert_priv_from_text(uint32 *se_priv, char *privilege);
void convert_priv_to_text(uint32 se_priv, char *privilege);
BOOL get_domain_group_from_sid(DOM_SID sid, GROUP_MAP *map);
@@ -2051,8 +2052,8 @@ BOOL pass_check(char *user, char *password, int pwlen, struct passwd *pwd,
/*The following definitions come from passdb/passdb.c */
BOOL initialize_password_db(BOOL reload);
-void pdb_init_sam(SAM_ACCOUNT *user);
-void pdb_clear_sam(SAM_ACCOUNT *user);
+BOOL pdb_init_sam(SAM_ACCOUNT **user);
+BOOL pdb_clear_sam(SAM_ACCOUNT *user);
struct sam_disp_info *pdb_sam_to_dispinfo(SAM_ACCOUNT *user);
char *pdb_encode_acct_ctrl(uint16 acct_ctrl, size_t length);
uint16 pdb_decode_acct_ctrl(const char *p);
@@ -2120,11 +2121,11 @@ BOOL pdb_set_uid (SAM_ACCOUNT *sampass, uid_t uid);
BOOL pdb_set_gid (SAM_ACCOUNT *sampass, gid_t gid);
BOOL pdb_set_user_rid (SAM_ACCOUNT *sampass, uint32 rid);
BOOL pdb_set_group_rid (SAM_ACCOUNT *sampass, uint32 grid);
-BOOL pdb_set_username (SAM_ACCOUNT *sampass, char *username);
-BOOL pdb_set_domain (SAM_ACCOUNT *sampass, char *domain);
-BOOL pdb_set_nt_username (SAM_ACCOUNT *sampass, char *nt_username);
-BOOL pdb_set_fullname (SAM_ACCOUNT *sampass, char *fullname);
-BOOL pdb_set_logon_script (SAM_ACCOUNT *sampass, char *logon_script);
+BOOL pdb_set_username(SAM_ACCOUNT *sampass, char *username);
+BOOL pdb_set_domain(SAM_ACCOUNT *sampass, char *domain);
+BOOL pdb_set_nt_username(SAM_ACCOUNT *sampass, char *nt_username);
+BOOL pdb_set_fullname(SAM_ACCOUNT *sampass, char *fullname);
+BOOL pdb_set_logon_script(SAM_ACCOUNT *sampass, char *logon_script);
BOOL pdb_set_profile_path (SAM_ACCOUNT *sampass, char *profile_path);
BOOL pdb_set_dir_drive (SAM_ACCOUNT *sampass, char *dir_drive);
BOOL pdb_set_homedir (SAM_ACCOUNT *sampass, char *homedir);
@@ -2142,22 +2143,22 @@ BOOL pdb_set_hours (SAM_ACCOUNT *sampass, uint8 *hours);
BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
-SAM_ACCOUNT* pdb_getsampwent (void);
-SAM_ACCOUNT* pdb_getsampwnam (char *username);
-SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
-SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
-BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
-BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
+BOOL pdb_getsampwent(SAM_ACCOUNT *user);
+BOOL pdb_getsampwnam(SAM_ACCOUNT *sam_acct, char *username);
+BOOL pdb_getsampwuid (SAM_ACCOUNT *sam_acct, uid_t uid);
+BOOL pdb_getsampwrid(SAM_ACCOUNT *sam_acct,uint32 rid);
+BOOL pdb_add_sam_account(SAM_ACCOUNT *sampass);
+BOOL pdb_update_sam_account(SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);
/*The following definitions come from passdb/pdb_tdb.c */
BOOL pdb_setsampwent(BOOL update);
void pdb_endsampwent(void);
-SAM_ACCOUNT* pdb_getsampwent(void);
-SAM_ACCOUNT* pdb_getsampwnam (char *sname);
-SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
-SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
+BOOL pdb_getsampwent(SAM_ACCOUNT *user);
+BOOL pdb_getsampwnam (SAM_ACCOUNT *user, char *sname);
+BOOL pdb_getsampwuid (SAM_ACCOUNT* user, uid_t uid);
+BOOL pdb_getsampwrid (SAM_ACCOUNT *user, uint32 rid);
BOOL pdb_delete_sam_account(char *sname);
BOOL pdb_update_sam_account (SAM_ACCOUNT *newpwd, BOOL override);
BOOL pdb_add_sam_account (SAM_ACCOUNT *newpwd);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 7f4825b501..0993d349a2 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -644,28 +644,25 @@ typedef struct
typedef struct sam_passwd
{
- TALLOC_CTX *mem_ctx; /* used for all dynamically allocated
- memory in this struct*/
-
- time_t logon_time; /* logon time */
- time_t logoff_time; /* logoff time */
- time_t kickoff_time; /* kickoff time */
- time_t pass_last_set_time; /* password last set time */
- time_t pass_can_change_time; /* password can change time */
- time_t pass_must_change_time; /* password must change time */
-
- char *username; /* UNIX username string */
- char *domain; /* Windows Domain name */
- char *nt_username; /* Windows username string */
- char *full_name; /* user's full name string */
- char *home_dir; /* home directory string */
- char *dir_drive; /* home directory drive string */
- char *logon_script; /* logon script string */
- char *profile_path; /* profile path string */
- char *acct_desc ; /* user description string */
- char *workstations; /* login from workstations string */
- char *unknown_str ; /* don't know what this is, yet. */
- char *munged_dial ; /* munged path name and dial-back tel number */
+ time_t logon_time; /* logon time */
+ time_t logoff_time; /* logoff time */
+ time_t kickoff_time; /* kickoff time */
+ time_t pass_last_set_time; /* password last set time */
+ time_t pass_can_change_time; /* password can change time */
+ time_t pass_must_change_time; /* password must change time */
+
+ pstring username; /* UNIX username string */
+ pstring domain; /* Windows Domain name */
+ pstring nt_username; /* Windows username string */
+ pstring full_name; /* user's full name string */
+ pstring home_dir; /* home directory string */
+ pstring dir_drive; /* home directory drive string */
+ pstring logon_script; /* logon script string */
+ pstring profile_path; /* profile path string */
+ pstring acct_desc ; /* user description string */
+ pstring workstations; /* login from workstations string */
+ pstring unknown_str ; /* don't know what this is, yet. */
+ pstring munged_dial ; /* munged path name and dial-back tel number */
uid_t uid; /* this is actually the unix uid_t */
gid_t gid; /* this is actually the unix gid_t */