summaryrefslogtreecommitdiffstats
path: root/source/include
diff options
context:
space:
mode:
Diffstat (limited to 'source/include')
-rw-r--r--source/include/includes.h1
-rw-r--r--source/include/proto.h91
-rw-r--r--source/include/rpc_samr.h6
-rw-r--r--source/include/smb.h9
4 files changed, 72 insertions, 35 deletions
diff --git a/source/include/includes.h b/source/include/includes.h
index 9c5fa95a589..1cc1ffde260 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -621,6 +621,7 @@ union semun {
#if (!defined(WITH_NISPLUS) && !defined(WITH_LDAP))
#define USE_SMBPASS_DB 1
+#define USE_SMBUNIX_DB 1
#endif
#if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
diff --git a/source/include/proto.h b/source/include/proto.h
index c4baa8f7a50..33c734a2106 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -36,11 +36,20 @@ LOCAL_GRP *getaliasrid(uint32 alias_rid, LOCAL_GRP_MEMBER **mem, int *num_mem);
LOCAL_GRP *getaliasgid(gid_t gid, LOCAL_GRP_MEMBER **mem, int *num_mem);
BOOL getuseraliasnam(char *user_name, LOCAL_GRP **als, int *num_alss);
void aldb_init_als(LOCAL_GRP *als);
+BOOL make_alias_line(char *p, int max_len,
+ LOCAL_GRP *als,
+ LOCAL_GRP_MEMBER **mem, int *num_mem);
/*The following definitions come from groupdb/aliasfile.c */
struct aliasdb_ops *file_initialise_alias_db(void);
+/*The following definitions come from groupdb/aliasunix.c */
+
+BOOL get_unixalias_members(struct group *als,
+ int *num_mem, LOCAL_GRP_MEMBER **members);
+struct aliasdb_ops *unix_initialise_alias_db(void);
+
/*The following definitions come from groupdb/groupdb.c */
BOOL initialise_group_db(void);
@@ -60,11 +69,20 @@ DOMAIN_GRP *getgrouprid(uint32 group_rid, DOMAIN_GRP_MEMBER **mem, int *num_mem)
DOMAIN_GRP *getgroupgid(gid_t gid, DOMAIN_GRP_MEMBER **mem, int *num_mem);
BOOL getusergroupsnam(char *user_name, DOMAIN_GRP **grp, int *num_grps);
void gpdb_init_grp(DOMAIN_GRP *grp);
+BOOL make_group_line(char *p, int max_len,
+ DOMAIN_GRP *grp,
+ DOMAIN_GRP_MEMBER **mem, int *num_mem);
/*The following definitions come from groupdb/groupfile.c */
struct groupdb_ops *file_initialise_group_db(void);
+/*The following definitions come from groupdb/groupunix.c */
+
+BOOL get_unixgroup_members(struct group *grp,
+ int *num_mem, DOMAIN_GRP_MEMBER **members);
+struct groupdb_ops *unix_initialise_group_db(void);
+
/*The following definitions come from lib/access.c */
BOOL allow_access(char *deny_list,char *allow_list,
@@ -263,6 +281,7 @@ char *tmpdir(void);
BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups);
int get_number(char *tmp);
char *Atoic(char *p, int *n, char *c);
+int* add_num_to_list(uint32 **num, int *count, int val);
char *get_numlist(char *p, uint32 **num, int *count);
void putip(void *dest,void *src);
char *dns_to_netbios_name(char *dns_name);
@@ -1223,6 +1242,7 @@ int lp_minor_announce_version(void);
void lp_set_name_resolve_order(char *new_order);
void lp_set_kernel_oplocks(BOOL val);
BOOL lp_kernel_oplocks(void);
+int lp_server_role(void);
/*The following definitions come from param/params.c */
@@ -1318,6 +1338,11 @@ struct smb_passwd *getsmbgrpuid(uid_t smb_userid,
/*The following definitions come from passdb/smbpass.c */
+void *startsmbfilepwent(BOOL update);
+void endsmbfilepwent(void *vp);
+SMB_BIG_UINT getsmbfilepwpos(void *vp);
+BOOL setsmbfilepwpos(void *vp, SMB_BIG_UINT tok);
+struct smb_passwd *getsmbfilepwent(void *vp);
struct passdb_ops *file_initialise_password_db(void);
/*The following definitions come from passdb/smbpasschange.c */
@@ -1341,6 +1366,10 @@ BOOL trust_get_passwd( unsigned char trust_passwd[16], char *domain, char *mynam
struct passgrp_ops *file_initialise_password_grp(void);
+/*The following definitions come from passdb/smbpassgroupunix.c */
+
+struct passgrp_ops *unix_initialise_password_grp(void);
+
/*The following definitions come from printing/pcap.c */
BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname);
@@ -1951,7 +1980,7 @@ void make_samr_r_lookup_names(SAMR_R_LOOKUP_NAMES *r_u,
void samr_io_r_lookup_names(char *desc, SAMR_R_LOOKUP_NAMES *r_u, prs_struct *ps, int depth);
void samr_io_q_unknown_12(char *desc, SAMR_Q_UNKNOWN_12 *q_u, prs_struct *ps, int depth);
void make_samr_r_unknown_12(SAMR_R_UNKNOWN_12 *r_u,
- uint32 num_aliases, fstring *als_name, uint32 *num_als_usrs,
+ uint32 num_aliases, fstring *als_name, uint8 *num_als_usrs,
uint32 status);
void samr_io_r_unknown_12(char *desc, SAMR_R_UNKNOWN_12 *r_u, prs_struct *ps, int depth);
void make_samr_q_open_user(SAMR_Q_OPEN_USER *q_u,
@@ -2157,31 +2186,28 @@ void wks_io_r_query_info(char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int
int make_dom_gids(DOMAIN_GRP *mem, int num_members, DOM_GID **ppgids);
int get_domain_user_groups(DOMAIN_GRP_MEMBER **grp_members, uint32 group_rid);
-uint32 lookup_builtin_names(DOM_SID *sid, char *name, uint8 *type);
-uint32 lookup_added_name(DOM_SID *sid, char *name, uint8 *type);
-uint32 lookup_name(DOM_SID *sid, char *name, uint8 *type);
-uint32 lookup_wk_group_name(DOM_SID *sid, char *group_name, uint8 *type);
-uint32 lookup_group_name(DOM_SID *sid, char *group_name, uint8 *type);
-uint32 lookup_wk_alias_name(DOM_SID *sid, char *alias_name, uint8 *type);
-uint32 lookup_alias_name(DOM_SID *sid, char *alias_name, uint8 *type);
-uint32 lookup_wk_user_name(DOM_SID *sid, char *user_name, uint8 *type);
-uint32 lookup_user_name(DOM_SID *sid, char *user_name, uint8 *type);
-uint32 lookup_group_rid(char *group_name, uint32 *rid, uint8 *type);
-uint32 lookup_wk_group_rid(char *group_name, uint32 *rid, uint8 *type);
-uint32 lookup_alias_sid(char *alias_name, DOM_SID *sid, uint8 *type);
-uint32 lookup_alias_rid(char *alias_name, uint32 *rid, uint8 *type);
-uint32 lookup_wk_alias_sid(char *alias_name, DOM_SID *sid, uint8 *type);
-uint32 lookup_wk_alias_rid(char *alias_name, uint32 *rid, uint8 *type);
-uint32 lookup_sid(char *name, DOM_SID *sid, uint8 *type);
+uint32 lookup_builtin_sid(DOM_SID *sid, char *name, uint8 *type);
+uint32 lookup_added_sid(DOM_SID *sid, char *name, uint8 *type);
+uint32 lookup_sid(DOM_SID *sid, char *name, uint8 *type);
+uint32 lookup_wk_group_sid(DOM_SID *sid, char *group_name, uint8 *type);
+uint32 lookup_group_sid(DOM_SID *sid, char *group_name, uint8 *type);
+uint32 lookup_wk_alias_sid(DOM_SID *sid, char *alias_name, uint8 *type);
+uint32 lookup_alias_sid(DOM_SID *sid, char *alias_name, uint8 *type);
+uint32 lookup_wk_user_sid(DOM_SID *sid, char *user_name, uint8 *type);
+uint32 lookup_user_sid(DOM_SID *sid, char *user_name, uint8 *type);
+uint32 lookup_group_name(char *grp_name, DOM_SID *sid, uint8 *type);
+uint32 lookup_wk_group_name(char *group_name, DOM_SID *sid, uint8 *type);
+uint32 lookup_alias_name(char *als_name, DOM_SID *sid, uint8 *type);
+uint32 lookup_wk_alias_name(char *alias_name, DOM_SID *sid, uint8 *type);
uint32 lookup_added_user_rids(char *user_name,
uint32 *usr_rid, uint32 *grp_rid);
-uint32 lookup_added_user_rid(char *user_name, uint32 *rid, uint8 *type);
-uint32 lookup_wk_user_rid(char *user_name, uint32 *rid, uint8 *type);
-uint32 lookup_added_grp_rid(char *name, uint32 *rid, uint8 *type);
-uint32 lookup_builtin_grp_rid(char *name, uint32 *rid, uint8 *type);
-uint32 lookup_grp_rid(char *name, uint32 *rid, uint8 *type);
-uint32 lookup_user_rid(char *name, uint32 *rid, uint8 *type);
-uint32 lookup_rid(char *name, uint32 *rid, uint8 *type);
+uint32 lookup_added_user_name(char *user_name, DOM_SID *sid, uint8 *type);
+uint32 lookup_wk_user_name(char *user_name, DOM_SID *sid, uint8 *type);
+uint32 lookup_added_grp_name(char *name, DOM_SID *sid, uint8 *type);
+uint32 lookup_builtin_grp_name(char *name, DOM_SID *sid, uint8 *type);
+uint32 lookup_grp_name(char *name, DOM_SID *sid, uint8 *type);
+uint32 lookup_user_name(char *name, DOM_SID *sid, uint8 *type);
+uint32 lookup_name(char *name, DOM_SID *sid, uint8 *type);
uint32 lookup_user_rids(char *name, uint32 *usr_rid, uint32 *grp_rid);
/*The following definitions come from rpc_server/srv_lsa.c */
@@ -2238,6 +2264,7 @@ BOOL api_samr_rpc(pipes_struct *p, prs_struct *data);
/*The following definitions come from rpc_server/srv_sid.c */
+void get_sam_domain_name(void);
BOOL get_member_domain_sid(void);
void generate_wellknown_sids(void);
BOOL generate_sam_sid(void);
@@ -2488,14 +2515,14 @@ void file_chain_restore(void);
/*The following definitions come from smbd/groupname.c */
-BOOL map_group_sid_to_name(DOM_SID *psid, char *group_name, char *nt_domain);
-BOOL map_alias_sid_to_name(DOM_SID *psid, char *alias_name, char *nt_domain);
-BOOL map_group_name_to_sid(char *group_name, DOM_SID *psid);
-BOOL map_alias_name_to_sid(char *alias_name, DOM_SID *psid);
-BOOL map_gid_to_alias_sid(gid_t gid, DOM_SID *psid);
-BOOL map_gid_to_group_sid( gid_t gid, DOM_SID *psid);
-BOOL map_group_sid_to_gid( DOM_SID *psid, gid_t *gid);
-BOOL map_alias_sid_to_gid( DOM_SID *psid, gid_t *gid);
+BOOL map_group_sid(DOM_SID *psid, gid_t *gid, char *group_name, char *nt_domain);
+BOOL map_alias_sid(DOM_SID *psid, gid_t *gid, char *alias_name, char *nt_domain);
+BOOL map_unix_group_name(char *group_name, DOM_SID *psid, char *ntgroup_name, char *nt_domain);
+BOOL map_unix_alias_name(char *alias_name, DOM_SID *psid, char *ntalias_name, char *nt_domain);
+BOOL map_nt_group_name(char *ntgroup_name, char *nt_domain, DOM_SID *psid, char *group_name, gid_t *gid);
+BOOL map_nt_alias_name(char *ntalias_name, char *nt_domain, DOM_SID *psid, char *alias_name, gid_t *gid);
+BOOL map_alias_gid(gid_t gid, DOM_SID *psid, char *nt_als_name, char *nt_domain);
+BOOL map_group_gid( gid_t gid, DOM_SID *psid, char *nt_grp_name, char *nt_domain);
/*The following definitions come from smbd/ipc.c */
diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h
index ef7fefc72e7..32914360079 100644
--- a/source/include/rpc_samr.h
+++ b/source/include/rpc_samr.h
@@ -842,7 +842,7 @@ called to resolve domain RID groups.
/* SAMR_Q_UNKNOWN_12 */
typedef struct q_samr_unknown_12_info
{
- POLICY_HND pol; /* policy handle */
+ POLICY_HND pol; /* policy handle */
uint32 num_gids1; /* number of rids being looked up */
uint32 rid; /* 0x0000 03e8 - RID of the server doing the query? */
@@ -884,7 +884,7 @@ typedef struct r_samr_unknown_12_info
/* SAMR_Q_OPEN_USER - probably an open */
typedef struct q_samr_open_user_info
{
- POLICY_HND domain_pol; /* policy handle */
+ POLICY_HND domain_pol; /* policy handle */
uint32 unknown_0; /* 32 bit unknown - 0x02011b */
uint32 user_rid; /* user RID */
@@ -894,7 +894,7 @@ typedef struct q_samr_open_user_info
/* SAMR_R_OPEN_USER - probably an open */
typedef struct r_samr_open_user_info
{
- POLICY_HND user_pol; /* policy handle associated with unknown id */
+ POLICY_HND user_pol; /* policy handle associated with unknown id */
uint32 status; /* return status */
} SAMR_R_OPEN_USER;
diff --git a/source/include/smb.h b/source/include/smb.h
index d0880c9cd3c..8ffd55d10ab 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -1560,6 +1560,15 @@ enum protocol_types {PROTOCOL_NONE,PROTOCOL_CORE,PROTOCOL_COREPLUS,PROTOCOL_LANM
/* security levels */
enum security_types {SEC_SHARE,SEC_USER,SEC_SERVER,SEC_DOMAIN};
+/* server roles */
+enum server_types
+{
+ ROLE_DOMAIN_NONE,
+ ROLE_DOMAIN_MEMBER,
+ ROLE_DOMAIN_BDC,
+ ROLE_DOMAIN_PDC
+};
+
/* printing types */
enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ};