Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Imldeployment
Commits
ceaa5caa
Commit
ceaa5caa
authored
8 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
rename keys for ldap user and its password
parent
6988ed5c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
public_html/deployment/classes/ldap.class.php
+12
-12
12 additions, 12 deletions
public_html/deployment/classes/ldap.class.php
with
12 additions
and
12 deletions
public_html/deployment/classes/ldap.class.php
+
12
−
12
View file @
ceaa5caa
...
...
@@ -10,8 +10,8 @@ class imlldap {
private
$_aLdap
=
array
(
'server'
=>
false
,
'port'
=>
false
,
'DnL
ooku
pUser'
=>
false
,
// ldap rdn oder dn
'PwL
ooku
pUser'
=>
false
,
'DnL
da
pUser'
=>
false
,
// ldap rdn oder dn
'PwL
da
pUser'
=>
false
,
'DnUserNode'
=>
false
,
// ou=People...
'DnAppNode'
=>
false
,
// cn=AppGroup...
'protoVersion'
=>
3
,
...
...
@@ -84,8 +84,8 @@ class imlldap {
* @param array $aConfig new config items
* 'server' => 'ldaps://ldap.example.com',
* 'port' => 636,
* 'DnL
ooku
pUser' => 'cn=Lookup,ou=ServiceAccounts,dc=org,dc=example.com', // ldap rdn oder dn
* 'PwL
ooku
pUser' => 'IkHEFFzlZ...99j0h8WdI0LrLhxU', // password
* 'DnL
da
pUser' => 'cn=Lookup,ou=ServiceAccounts,dc=org,dc=example.com', // ldap rdn oder dn
* 'PwL
da
pUser' => 'IkHEFFzlZ...99j0h8WdI0LrLhxU', // password
* 'DnUserNode' => 'ou=People,ou=ORG,dc=org,dc=example.com',
* 'DnAppNode' => '' optional dn ... if a user must be member of a given group
* 'protoVersion' => 3
...
...
@@ -210,7 +210,7 @@ class imlldap {
*/
public
function
search
(
$sSearchFilter
,
$aAttributesToGet
=
array
(
"*"
))
{
if
(
!
$this
->
_ldapBind
)
{
$this
->
bind
(
$this
->
_aLdap
[
'DnL
ooku
pUser'
],
$this
->
_aLdap
[
'PwL
ooku
pUser'
]);
$this
->
bind
(
$this
->
_aLdap
[
'DnL
da
pUser'
],
$this
->
_aLdap
[
'PwL
da
pUser'
]);
}
$this
->
_w
(
__FUNCTION__
.
' DN = '
.
$this
->
_aLdap
[
'DnUserNode'
]
.
' filter = '
.
$sSearchFilter
);
...
...
@@ -237,7 +237,7 @@ class imlldap {
*/
public
function
getUserInfo
(
$sUser
,
$aAttributesToGet
=
array
(
"*"
))
{
if
(
!
$this
->
_ldapBind
)
{
$this
->
bind
(
$this
->
_aLdap
[
'DnL
ooku
pUser'
],
$this
->
_aLdap
[
'PwL
ooku
pUser'
]);
$this
->
bind
(
$this
->
_aLdap
[
'DnL
da
pUser'
],
$this
->
_aLdap
[
'PwL
da
pUser'
]);
}
// generate search filter
...
...
@@ -284,7 +284,7 @@ class imlldap {
*/
public
function
setPassword
(
$sUser
,
$sPW
){
if
(
!
$this
->
_ldapBind
)
{
$this
->
bind
(
$this
->
_aLdap
[
'DnL
ooku
pUser'
],
$this
->
_aLdap
[
'PwL
ooku
pUser'
]);
$this
->
bind
(
$this
->
_aLdap
[
'DnL
da
pUser'
],
$this
->
_aLdap
[
'PwL
da
pUser'
]);
}
$sDn
=
$this
->
getUserDn
(
$sUser
);
if
(
$sDn
){
...
...
@@ -305,7 +305,7 @@ class imlldap {
public
function
objAdd
(
$sDn
,
$aItem
){
$this
->
_w
(
__FUNCTION__
.
'("'
.
$sDn
.
'", [array])'
);
if
(
!
$this
->
_ldapBind
)
{
$this
->
bind
(
$this
->
_aLdap
[
'DnL
ooku
pUser'
],
$this
->
_aLdap
[
'PwL
ooku
pUser'
]);
$this
->
bind
(
$this
->
_aLdap
[
'DnL
da
pUser'
],
$this
->
_aLdap
[
'PwL
da
pUser'
]);
}
return
ldap_add
(
$this
->
_ldapConn
,
$sDn
,
$aItem
);
}
...
...
@@ -321,7 +321,7 @@ class imlldap {
public
function
objAddAttr
(
$sDn
,
$aItem
){
$this
->
_w
(
__FUNCTION__
.
'("'
.
$sDn
.
'", [array])'
);
if
(
!
$this
->
_ldapBind
)
{
$this
->
bind
(
$this
->
_aLdap
[
'DnL
ooku
pUser'
],
$this
->
_aLdap
[
'PwL
ooku
pUser'
]);
$this
->
bind
(
$this
->
_aLdap
[
'DnL
da
pUser'
],
$this
->
_aLdap
[
'PwL
da
pUser'
]);
}
if
(
$sDn
&&
is_array
(
$aItem
)){
$this
->
_w
(
__FUNCTION__
.
' '
.
$this
->
_ldapConn
?
'Verbindung da'
:
'kein LDAP Connect'
);
...
...
@@ -346,7 +346,7 @@ class imlldap {
public
function
objUpdate
(
$sDn
,
$aItem
){
$this
->
_w
(
__FUNCTION__
.
'("'
.
$sDn
.
'", [array])'
);
if
(
!
$this
->
_ldapBind
)
{
$this
->
bind
(
$this
->
_aLdap
[
'DnL
ooku
pUser'
],
$this
->
_aLdap
[
'PwL
ooku
pUser'
]);
$this
->
bind
(
$this
->
_aLdap
[
'DnL
da
pUser'
],
$this
->
_aLdap
[
'PwL
da
pUser'
]);
}
if
(
$sDn
&&
is_array
(
$aItem
)){
return
ldap_mod_replace
(
$this
->
_ldapConn
,
$sDn
,
$aItem
);
...
...
@@ -366,7 +366,7 @@ class imlldap {
public
function
objDelete
(
$sDn
){
$this
->
_w
(
__FUNCTION__
.
'("'
.
$sDn
.
'")'
);
if
(
!
$this
->
_ldapBind
)
{
$this
->
bind
(
$this
->
_aLdap
[
'DnL
ooku
pUser'
],
$this
->
_aLdap
[
'PwL
ooku
pUser'
]);
$this
->
bind
(
$this
->
_aLdap
[
'DnL
da
pUser'
],
$this
->
_aLdap
[
'PwL
da
pUser'
]);
}
if
(
$sDn
){
...
...
@@ -392,7 +392,7 @@ class imlldap {
public
function
objDeleteAttr
(
$sDn
,
$aItem
){
$this
->
_w
(
__FUNCTION__
.
'("'
.
$sDn
.
'", [array])'
);
if
(
!
$this
->
_ldapBind
)
{
$this
->
bind
(
$this
->
_aLdap
[
'DnL
ooku
pUser'
],
$this
->
_aLdap
[
'PwL
ooku
pUser'
]);
$this
->
bind
(
$this
->
_aLdap
[
'DnL
da
pUser'
],
$this
->
_aLdap
[
'PwL
da
pUser'
]);
}
if
(
$sDn
&&
is_array
(
$aItem
)){
$this
->
_w
(
__FUNCTION__
.
' '
.
$this
->
_ldapConn
?
'Verbindung da'
:
'kein LDAP Connect'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment