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
a6fd7fa9
Commit
a6fd7fa9
authored
17 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
add -S to slapadd to set desired SID in generated entryCSN/contextCSN
parent
5ed5bc58
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/man/man8/slapadd.8
+5
-0
5 additions, 0 deletions
doc/man/man8/slapadd.8
servers/slapd/slapadd.c
+4
-1
4 additions, 1 deletion
servers/slapd/slapadd.c
servers/slapd/slapcommon.c
+9
-1
9 additions, 1 deletion
servers/slapd/slapcommon.c
servers/slapd/slapcommon.h
+2
-0
2 additions, 0 deletions
servers/slapd/slapcommon.h
with
20 additions
and
2 deletions
doc/man/man8/slapadd.8
+
5
−
0
View file @
a6fd7fa9
...
...
@@ -18,6 +18,7 @@ slapadd \- Add entries to a SLAPD database
.B [\-o name[=value]
.B [\-q]
.B [\-s]
.B [\-S SID]
.B [\-u]
.B [\-v]
.B [\-w]
...
...
@@ -119,6 +120,10 @@ databases containing special objects, such as fractional objects on a
partial replica. Loading normal objects which do not conform to
schema may result in unexpected and ill behavior.
.TP
.B \-S " SID"
Server ID to use in generated entryCSN. Also used for contextCSN
if `\-w' is set as well. Defaults to 0.
.TP
.B \-u
enable dry-run (don't write to backend) mode.
.TP
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/slapadd.c
+
4
−
1
View file @
a6fd7fa9
...
...
@@ -67,6 +67,9 @@ slapadd( int argc, char **argv )
int
rc
=
EXIT_SUCCESS
;
int
manage
=
0
;
/* default "000" */
csnsid
=
0
;
slap_tool_init
(
progname
,
SLAPADD
,
argc
,
argv
);
memset
(
&
opbuf
,
0
,
sizeof
(
opbuf
)
);
...
...
@@ -220,7 +223,7 @@ slapadd( int argc, char **argv )
nvals
[
1
].
bv_len
=
0
;
nvals
[
1
].
bv_val
=
NULL
;
csn
.
bv_len
=
lutil_csnstr
(
csnbuf
,
sizeof
(
csnbuf
),
0
,
0
);
csn
.
bv_len
=
lutil_csnstr
(
csnbuf
,
sizeof
(
csnbuf
),
csnsid
,
0
);
csn
.
bv_val
=
csnbuf
;
timestamp
.
bv_val
=
timebuf
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/slapcommon.c
+
9
−
1
View file @
a6fd7fa9
...
...
@@ -241,7 +241,7 @@ slap_tool_init(
switch
(
tool
)
{
case
SLAPADD
:
options
=
"b:cd:f:F:gj:l:n:o:qstuvw"
;
options
=
"b:cd:f:F:gj:l:n:o:qs
S:
tuvw"
;
break
;
case
SLAPCAT
:
...
...
@@ -384,6 +384,14 @@ slap_tool_init(
realm
=
optarg
;
break
;
case
'S'
:
if
(
lutil_atoul
(
&
csnsid
,
optarg
)
||
csnsid
>
SLAP_SYNC_SID_MAX
)
{
usage
(
tool
,
progname
);
}
break
;
case
's'
:
/* dump subtree */
if
(
tool
==
SLAPADD
)
mode
|=
SLAP_TOOL_NO_SCHEMA_CHECK
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/slapcommon.h
+
2
−
0
View file @
a6fd7fa9
...
...
@@ -60,6 +60,7 @@ typedef struct tool_vars {
slap_ssf_t
tv_tls_ssf
;
slap_ssf_t
tv_sasl_ssf
;
unsigned
tv_dn_mode
;
unsigned
int
tv_csnsid
;
}
tool_vars
;
extern
tool_vars
tool_globals
;
...
...
@@ -91,6 +92,7 @@ extern tool_vars tool_globals;
#define tls_ssf tool_globals.tv_tls_ssf
#define sasl_ssf tool_globals.tv_sasl_ssf
#define dn_mode tool_globals.tv_dn_mode
#define csnsid tool_globals.tv_csnsid
#define SLAP_TOOL_LDAPDN_PRETTY SLAP_LDAPDN_PRETTY
#define SLAP_TOOL_LDAPDN_NORMAL (SLAP_LDAPDN_PRETTY << 1)
...
...
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