mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
support munged dial for ldapsam; patch from Aurlien Degrmont; bug 800
(This used to be commit acf9eae7b0
)
This commit is contained in:
parent
555ef2d5cf
commit
c6f0190b54
@ -236,6 +236,11 @@ attributetype ( 1.3.6.1.4.1.7165.2.1.38 NAME 'sambaDomainName'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.7165.2.1.43 NAME 'sambaMungedDial'
|
||||
DESC ''
|
||||
EQUALITY caseExactMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1050} )
|
||||
|
||||
##
|
||||
## SID, of any type
|
||||
##
|
||||
@ -288,38 +293,6 @@ attributetype ( 1.3.6.1.4.1.7165.2.1.40 NAME 'sambaAlgorithmicRidBase'
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.7165.2.1.41 NAME 'sambaShareName'
|
||||
DESC 'Share Name'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.7165.2.1.42 NAME 'sambaOptionName'
|
||||
DESC 'Option Name'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.7165.2.1.43 NAME 'sambaBoolOption'
|
||||
DESC 'A boolean option'
|
||||
EQUALITY booleanMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.7165.2.1.44 NAME 'sambaIntegerOption'
|
||||
DESC 'An integer option'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.7165.2.1.45 NAME 'sambaStringOption'
|
||||
DESC 'A string option'
|
||||
EQUALITY caseExactIA5Match
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
|
||||
|
||||
attributetype ( 1.3.6.1.4.1.7165.2.1.46 NAME 'sambaStringListOption'
|
||||
DESC 'A string list option'
|
||||
EQUALITY caseIgnoreMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
|
||||
|
||||
#######################################################################
|
||||
## objectClasses used by Samba 3.0 schema ##
|
||||
#######################################################################
|
||||
@ -340,7 +313,7 @@ objectclass ( 1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY
|
||||
sambaPwdCanChange $ sambaPwdMustChange $ sambaAcctFlags $
|
||||
displayName $ sambaHomePath $ sambaHomeDrive $ sambaLogonScript $
|
||||
sambaProfilePath $ description $ sambaUserWorkstations $
|
||||
sambaPrimaryGroupSID $ sambaDomainName ))
|
||||
sambaPrimaryGroupSID $ sambaDomainName $ sambaMungedDial))
|
||||
|
||||
##
|
||||
## Group mapping info
|
||||
@ -375,19 +348,3 @@ objectclass ( 1.3.6.1.4.1.7165.1.2.2.9 NAME 'sambaSidEntry' SUP top STRUCTURAL
|
||||
DESC 'Structural Class for a SID'
|
||||
MUST ( sambaSID ) )
|
||||
|
||||
|
||||
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.7165.1.2.2.10 NAME 'sambaConfig' SUP top AUXILIARY
|
||||
DESC 'Samba Configuration Section'
|
||||
MAY ( description ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.7165.1.2.2.11 NAME 'sambaShare' SUP top STRUCTURAL
|
||||
DESC 'Samba Share Section'
|
||||
MUST ( sambaShareName )
|
||||
MAY ( description ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.7165.1.2.2.12 NAME 'sambaConfigOption' SUP top STRUCTURAL
|
||||
DESC 'Samba Configuration Option'
|
||||
MUST ( sambaOptionName )
|
||||
MAY ( sambaBoolOption $ sambaIntegerOption $ sambaStringOption $ sambaStringListoption $ description ) )
|
||||
|
@ -90,6 +90,7 @@
|
||||
#define LDAP_ATTR_NEXT_RID 34
|
||||
#define LDAP_ATTR_BAD_PASSWORD_COUNT 35
|
||||
#define LDAP_ATTR_LOGON_COUNT 36
|
||||
#define LDAP_ATTR_MUNGED_DIAL 37
|
||||
|
||||
typedef struct _attrib_map_entry {
|
||||
int attrib;
|
||||
|
@ -97,6 +97,7 @@ ATTRIB_MAP_ENTRY attrib_map_v30[] = {
|
||||
{ LDAP_ATTR_DOMAIN, "sambaDomainName" },
|
||||
{ LDAP_ATTR_OBJCLASS, "objectClass" },
|
||||
{ LDAP_ATTR_ACB_INFO, "sambaAcctFlags" },
|
||||
{ LDAP_ATTR_MUNGED_DIAL, "sambaMungedDial" },
|
||||
{ LDAP_ATTR_LIST_END, NULL }
|
||||
};
|
||||
|
||||
|
@ -415,8 +415,8 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state,
|
||||
logon_script,
|
||||
profile_path,
|
||||
acct_desc,
|
||||
munged_dial,
|
||||
workstations;
|
||||
char munged_dial[2048];
|
||||
uint32 user_rid;
|
||||
uint8 smblmpwd[LM_HASH_LEN],
|
||||
smbntpwd[NT_HASH_LEN];
|
||||
@ -660,6 +660,13 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state,
|
||||
pdb_set_workstations(sampass, workstations, PDB_SET);
|
||||
}
|
||||
|
||||
if (!smbldap_get_single_attribute(ldap_state->smbldap_state->ldap_struct, entry,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_MUNGED_DIAL), munged_dial)) {
|
||||
/* leave as default */;
|
||||
} else {
|
||||
pdb_set_munged_dial(sampass, munged_dial, PDB_SET);
|
||||
}
|
||||
|
||||
/* FIXME: hours stuff should be cleaner */
|
||||
|
||||
logon_divs = 168;
|
||||
@ -703,7 +710,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state,
|
||||
pdb_set_hours_len(sampass, hours_len, PDB_SET);
|
||||
pdb_set_logon_divs(sampass, logon_divs, PDB_SET);
|
||||
|
||||
pdb_set_munged_dial(sampass, munged_dial, PDB_SET);
|
||||
/* pdb_set_munged_dial(sampass, munged_dial, PDB_SET); */
|
||||
|
||||
/* pdb_set_unknown_3(sampass, unknown3, PDB_SET); */
|
||||
|
||||
@ -851,7 +858,12 @@ static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state,
|
||||
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, existing, mods,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_USER_WKS),
|
||||
pdb_get_workstations(sampass));
|
||||
|
||||
|
||||
if (need_update(sampass, PDB_MUNGEDDIAL))
|
||||
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, existing, mods,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_MUNGED_DIAL),
|
||||
pdb_get_munged_dial(sampass));
|
||||
|
||||
if (need_update(sampass, PDB_SMBHOME))
|
||||
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, existing, mods,
|
||||
get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_HOME_PATH),
|
||||
|
Loading…
Reference in New Issue
Block a user