Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Eric Vidal
66
Commits
43654286
Commit
43654286
authored
1 year ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
fix switch of service at tree remove command
parent
e76a9639
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib66/exec/ssexec_tree_admin.c
+11
-4
11 additions, 4 deletions
src/lib66/exec/ssexec_tree_admin.c
with
11 additions
and
4 deletions
src/lib66/exec/ssexec_tree_admin.c
+
11
−
4
View file @
43654286
...
...
@@ -973,8 +973,10 @@ void tree_rules(char const *base, char const *treename, uid_t *uids, uint8_t wha
log_info
(
"Permissions rules set successfully for tree: "
,
treename
)
;
}
static
void
tree_service_switch_contents
(
char
const
*
base
,
char
const
*
treesrc
,
char
const
*
treedst
)
static
void
tree_service_switch_contents
(
char
const
*
base
,
char
const
*
treesrc
,
char
const
*
treedst
,
ssexec_t
*
info
)
{
log_flow
()
;
size_t
pos
=
0
;
resolve_tree_t
tres
=
RESOLVE_TREE_ZERO
;
resolve_wrapper_t_ref
wres
=
resolve_set_struct
(
DATA_TREE
,
&
tres
)
;
...
...
@@ -987,6 +989,9 @@ static void tree_service_switch_contents(char const *base, char const *treesrc,
FOREACH_SASTR
(
&
sa
,
pos
)
{
log_trace
(
"switch service: "
,
sa
.
s
+
pos
,
" to tree: "
,
treedst
)
;
tree_service_add
(
treedst
,
sa
.
s
+
pos
,
info
)
;
if
(
!
resolve_modify_field_g
(
swres
,
base
,
sa
.
s
+
pos
,
E_RESOLVE_SERVICE_TREENAME
,
treedst
))
log_dieu
(
LOG_EXIT_SYS
,
"modify resolve file of: "
,
sa
.
s
+
pos
)
;
}
...
...
@@ -996,7 +1001,7 @@ static void tree_service_switch_contents(char const *base, char const *treesrc,
resolve_free
(
swres
)
;
}
void
tree_remove
(
graph_t
*
g
,
char
const
*
base
,
char
const
*
treename
)
void
tree_remove
(
graph_t
*
g
,
char
const
*
base
,
char
const
*
treename
,
ssexec_t
*
info
)
{
log_flow
()
;
...
...
@@ -1034,9 +1039,11 @@ void tree_remove(graph_t *g, char const *base, char const *treename)
if
(
r
)
current
=
tree
;
else
current
=
SS_DEFAULT_TREENAME
;
}
tree_service_switch_contents
(
base
,
treename
,
current
)
;
tree_service_switch_contents
(
base
,
treename
,
current
,
info
)
;
log_trace
(
"remove resolve file of tree: "
,
treename
)
;
resolve_remove_g
(
base
,
treename
,
DATA_TREE
)
;
...
...
@@ -1237,7 +1244,7 @@ int ssexec_tree_admin(int argc, char const *const *argv, ssexec_t *info)
graph_build_tree
(
&
graph
,
info
->
base
.
s
,
E_RESOLVE_TREE_MASTER_CONTENTS
)
;
if
(
what
.
remove
)
{
tree_remove
(
&
graph
,
info
->
base
.
s
,
info
->
treename
.
s
)
;
tree_remove
(
&
graph
,
info
->
base
.
s
,
info
->
treename
.
s
,
info
)
;
goto
freed
;
}
...
...
This diff is collapsed.
Click to expand it.
Eric Vidal
@Obarun
mentioned in issue
#3 (closed)
·
1 year ago
mentioned in issue
#3 (closed)
mentioned in issue #3
Toggle commit list
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