Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
3bc58b5e
Commit
3bc58b5e
authored
26 years ago
by
Hallvard Furuseth
Browse files
Options
Downloads
Patches
Plain Diff
Removed bad LDAP* argument to disambiguate()
parent
435a502c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clients/ud/find.c
+16
-37
16 additions, 37 deletions
clients/ud/find.c
with
16 additions
and
37 deletions
clients/ud/find.c
+
16
−
37
View file @
3bc58b5e
...
...
@@ -13,6 +13,7 @@
#include
"portable.h"
#include
<stdio.h>
#include
<stdlib.h>
/* get atoi() */
#include
<ac/ctype.h>
#include
<ac/string.h>
...
...
@@ -23,18 +24,11 @@
#include
"ud.h"
extern
char
*
search_base
;
/* search base */
extern
int
verbose
;
/* verbose mode flag */
extern
LDAP
*
ld
;
/* our ldap descriptor */
static
int
num_picked
=
0
;
/* used when user picks entry at More prompt */
#ifdef DEBUG
extern
int
debug
;
/* debug flag */
#endif
vrfy
(
dn
)
char
*
dn
;
int
vrfy
(
char
*
dn
)
{
LDAPMessage
*
results
;
static
char
*
attrs
[
2
]
=
{
"objectClass"
,
NULL
};
...
...
@@ -61,11 +55,8 @@ char *dn;
}
static
LDAPMessage
*
disambiguate
(
result
,
matches
,
read_attrs
,
who
)
LDAPMessage
*
result
;
int
matches
;
char
**
read_attrs
;
char
*
who
;
static
LDAPMessage
*
disambiguate
(
LDAPMessage
*
result
,
int
matches
,
char
**
read_attrs
,
char
*
who
)
{
int
choice
;
/* entry that user chooses */
int
i
;
...
...
@@ -74,7 +65,6 @@ char *who;
char
*
name
=
NULL
;
/* DN to lookup */
LDAPMessage
*
mp
;
int
ld_errno
=
0
;
extern
void
Free
();
#ifdef DEBUG
if
(
debug
&
D_TRACE
)
...
...
@@ -161,9 +151,8 @@ char *who;
}
}
LDAPMessage
*
find
(
who
,
quiet
)
char
*
who
;
int
quiet
;
LDAPMessage
*
find
(
char
*
who
,
int
quiet
)
{
register
int
i
,
j
,
k
;
/* general ints */
int
matches
;
/* from ldap_count_entries() */
...
...
@@ -177,9 +166,6 @@ int quiet;
char
response
[
SMALL_BUF_SIZE
];
char
*
cp
,
*
dn
,
**
rdns
;
LDAPFiltInfo
*
fi
;
extern
LDAPFiltDesc
*
lfdp
;
/* LDAP filter descriptor */
extern
struct
attribute
attrlist
[];
/* complete list of attrs */
extern
void
Free
();
#ifdef DEBUG
if
(
debug
&
D_TRACE
)
...
...
@@ -247,8 +233,7 @@ int quiet;
ldap_set_option
(
ld
,
LDAP_OPT_DEREF
,
&
savederef
);
return
(
res
);
}
else
if
(
matches
>
1
)
{
return
(
disambiguate
(
ld
,
res
,
matches
,
read_attrs
,
who
)
);
return
disambiguate
(
res
,
matches
,
read_attrs
,
who
);
}
ldap_set_option
(
ld
,
LDAP_OPT_DEREF
,
&
savederef
);
}
...
...
@@ -337,8 +322,8 @@ int quiet;
return
(
NULL
);
}
pick_one
(
i
)
int
i
;
int
pick_one
(
int
i
)
{
int
n
;
char
user_pick
[
SMALL_BUF_SIZE
];
...
...
@@ -363,13 +348,10 @@ int i;
/* NOTREACHED */
}
print_list
(
list
,
names
,
matches
)
LDAPMessage
*
list
;
char
*
names
[];
int
*
matches
;
void
print_list
(
LDAPMessage
*
list
,
char
*
names
[],
int
*
matches
)
{
char
**
rdns
,
**
cpp
;
extern
int
lpp
;
char
resp
[
SMALL_BUF_SIZE
];
register
LDAPMessage
*
ep
;
register
int
i
=
1
;
...
...
@@ -410,12 +392,10 @@ again:
}
*
matches
=
i
-
1
;
names
[
i
]
=
NULL
;
return
;
}
find_all_subscribers
(
sub
,
group
)
char
*
sub
[];
char
*
group
;
int
find_all_subscribers
(
char
*
sub
[],
char
*
group
)
{
int
count
;
LDAPMessage
*
result
;
...
...
@@ -460,9 +440,8 @@ char *group;
return
(
count
);
}
char
*
fetch_boolean_value
(
who
,
attr
)
char
*
who
;
struct
attribute
attr
;
char
*
fetch_boolean_value
(
char
*
who
,
struct
attribute
attr
)
{
LDAPMessage
*
result
;
/* from the search below */
register
LDAPMessage
*
ep
;
/* entry pointer */
...
...
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