summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-05-17 22:04:24 +0200
committerGünther Deschner <gd@samba.org>2010-05-18 00:44:26 +0200
commit3b529d50be5613f37cf853714ecf78887df1d01b (patch)
treed3253ac410fbc74898d8a6543569670b68d2f511 /source3/passdb
parent2deff342b949ef7f91134115aa77c4051e2a4c33 (diff)
downloadsamba-3b529d50be5613f37cf853714ecf78887df1d01b.tar.gz
samba-3b529d50be5613f37cf853714ecf78887df1d01b.tar.bz2
samba-3b529d50be5613f37cf853714ecf78887df1d01b.zip
s3-rpc_misc: clean out include/rpc_misc.h.
Well known rids don't really belong into an rpc header, just use the ones defined in security.idl. Guenther
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c10
-rw-r--r--source3/passdb/pdb_get_set.c4
-rw-r--r--source3/passdb/pdb_interface.c6
-rw-r--r--source3/passdb/pdb_ldap.c2
-rw-r--r--source3/passdb/pdb_smbpasswd.c4
5 files changed, 13 insertions, 13 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 0adefd5c6d..9514e05254 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -193,7 +193,7 @@ static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *p
/* Special case for the guest account which must have a RID of 501 */
if ( strequal( pwd->pw_name, guest_account ) ) {
- if ( !pdb_set_user_sid_from_rid(user, DOMAIN_USER_RID_GUEST, PDB_DEFAULT)) {
+ if ( !pdb_set_user_sid_from_rid(user, DOMAIN_RID_GUEST, PDB_DEFAULT)) {
return NT_STATUS_NO_SUCH_USER;
}
return NT_STATUS_OK;
@@ -565,10 +565,10 @@ bool algorithmic_pdb_rid_is_user(uint32 rid)
{
if ( rid_is_well_known(rid) ) {
/*
- * The only well known user RIDs are DOMAIN_USER_RID_ADMIN
- * and DOMAIN_USER_RID_GUEST.
+ * The only well known user RIDs are DOMAIN_RID_ADMINISTRATOR
+ * and DOMAIN_RID_GUEST.
*/
- if(rid == DOMAIN_USER_RID_ADMIN || rid == DOMAIN_USER_RID_GUEST)
+ if(rid == DOMAIN_RID_ADMINISTRATOR || rid == DOMAIN_RID_GUEST)
return True;
} else if((rid & RID_TYPE_MASK) == USER_RID_TYPE) {
return True;
@@ -592,7 +592,7 @@ bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
the group already exists. */
if ( strequal( name, "None" ) ) {
- *rid = DOMAIN_GROUP_RID_USERS;
+ *rid = DOMAIN_RID_USERS;
*type = SID_NAME_DOM_GRP;
return True;
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 4725e8e2f1..1416e287ac 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -274,7 +274,7 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
/* Just set it to the 'Domain Users' RID of 513 which will
always resolve to a name */
- sid_compose(gsid, get_global_sam_sid(), DOMAIN_GROUP_RID_USERS);
+ sid_compose(gsid, get_global_sam_sid(), DOMAIN_RID_USERS);
sampass->group_sid = gsid;
@@ -584,7 +584,7 @@ bool pdb_set_group_sid(struct samu *sampass, const DOM_SID *g_sid, enum pdb_valu
/* if we cannot resolve the SID to gid, then just ignore it and
store DOMAIN_USERS as the primary groupSID */
- sid_compose(&dug_sid, get_global_sam_sid(), DOMAIN_GROUP_RID_USERS);
+ sid_compose(&dug_sid, get_global_sam_sid(), DOMAIN_RID_USERS);
if (sid_equal(&dug_sid, g_sid)) {
sid_copy(sampass->group_sid, &dug_sid);
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 130909e7fe..abc023081e 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -281,7 +281,7 @@ bool pdb_getsampwsid(struct samu *sam_acct, const DOM_SID *sid)
if ( !sid_peek_check_rid( get_global_sam_sid(), sid, &rid ) )
return False;
- if ( rid == DOMAIN_USER_RID_GUEST ) {
+ if ( rid == DOMAIN_RID_GUEST ) {
DEBUG(6,("pdb_getsampwsid: Building guest account\n"));
return guest_user_info( sam_acct );
}
@@ -702,7 +702,7 @@ NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
sid_peek_rid( sid, &rid );
- if ( rid == DOMAIN_GROUP_RID_USERS ) {
+ if ( rid == DOMAIN_RID_USERS ) {
*p_num_members = 0;
*pp_member_rids = NULL;
@@ -1536,7 +1536,7 @@ static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
return False;
}
- if ( rid == DOMAIN_GROUP_RID_USERS ) {
+ if ( rid == DOMAIN_RID_USERS ) {
*name = talloc_strdup(mem_ctx, "None" );
*psid_name_use = SID_NAME_DOM_GRP;
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index a66ae9791a..e3bd72a629 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -5402,7 +5402,7 @@ static NTSTATUS ldapsam_create_user(struct pdb_methods *my_methods,
DEBUG(3,("ldapsam_create_user: Creating new posix user\n"));
/* retrieve the Domain Users group gid */
- if (!sid_compose(&group_sid, get_global_sam_sid(), DOMAIN_GROUP_RID_USERS) ||
+ if (!sid_compose(&group_sid, get_global_sam_sid(), DOMAIN_RID_USERS) ||
!sid_to_gid(&group_sid, &gid)) {
DEBUG (0, ("ldapsam_create_user: Unable to get the Domain Users gid: bailing out!\n"));
return NT_STATUS_INVALID_PRIMARY_GROUP;
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index a327da4cac..17c7f333d2 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1195,7 +1195,7 @@ static bool build_smb_pass (struct smb_passwd *smb_pw, const struct samu *sampas
rid = pdb_get_user_rid(sampass);
/* If the user specified a RID, make sure its able to be both stored and retreived */
- if (rid == DOMAIN_USER_RID_GUEST) {
+ if (rid == DOMAIN_RID_GUEST) {
struct passwd *passwd = getpwnam_alloc(NULL, lp_guestaccount());
if (!passwd) {
DEBUG(0, ("Could not find guest account via getpwnam()! (%s)\n", lp_guestaccount()));
@@ -1332,7 +1332,7 @@ static NTSTATUS smbpasswd_getsampwsid(struct pdb_methods *my_methods, struct sam
return NT_STATUS_UNSUCCESSFUL;
/* More special case 'guest account' hacks... */
- if (rid == DOMAIN_USER_RID_GUEST) {
+ if (rid == DOMAIN_RID_GUEST) {
const char *guest_account = lp_guestaccount();
if (!(guest_account && *guest_account)) {
DEBUG(1, ("Guest account not specfied!\n"));