summaryrefslogtreecommitdiff
path: root/source3/passdb/passdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r--source3/passdb/passdb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 191844a454..c53b300198 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -432,28 +432,28 @@ BOOL pdb_name_to_rid(const char *user_name, uint32 *u_rid, uint32 *g_rid)
Converts NT user RID to a UNIX uid.
********************************************************************/
-uid_t pdb_user_rid_to_uid(uint32 user_rid)
+uid_t fallback_pdb_user_rid_to_uid(uint32 user_rid)
{
return (uid_t)(((user_rid & (~USER_RID_TYPE))- 1000)/RID_MULTIPLIER);
}
/*******************************************************************
- Converts NT group RID to a UNIX gid.
+ converts UNIX uid to an NT User RID.
********************************************************************/
-gid_t pdb_group_rid_to_gid(uint32 group_rid)
+uint32 fallback_pdb_uid_to_user_rid(uid_t uid)
{
- return (gid_t)(((group_rid & (~GROUP_RID_TYPE))- 1000)/RID_MULTIPLIER);
+ return (((((uint32)uid)*RID_MULTIPLIER) + 1000) | USER_RID_TYPE);
}
/*******************************************************************
- converts UNIX uid to an NT User RID.
+ Converts NT group RID to a UNIX gid.
********************************************************************/
-uint32 pdb_uid_to_user_rid(uid_t uid)
+gid_t pdb_group_rid_to_gid(uint32 group_rid)
{
- return (((((uint32)uid)*RID_MULTIPLIER) + 1000) | USER_RID_TYPE);
+ return (gid_t)(((group_rid & (~GROUP_RID_TYPE))- 1000)/RID_MULTIPLIER);
}
/*******************************************************************