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
952c3ec6
Commit
952c3ec6
authored
6 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
create livetree directory if it not exist
parent
d8be8dc1
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/rc_init.c
+17
-1
17 additions, 1 deletion
src/lib66/rc_init.c
with
17 additions
and
1 deletion
src/lib66/rc_init.c
+
17
−
1
View file @
952c3ec6
...
...
@@ -19,6 +19,8 @@
#include
<oblibs/error2.h>
#include
<oblibs/string.h>
#include
<oblibs/types.h>
#include
<oblibs/directory.h>
#include
<skalibs/genalloc.h>
#include
<skalibs/djbunix.h>
...
...
@@ -35,7 +37,7 @@
* @Return 0 on fail */
int
rc_init
(
ssexec_t
*
info
,
char
const
*
const
*
envp
)
{
int
writein
,
wstat
,
empty
=
0
;
int
r
,
writein
,
wstat
,
empty
=
0
;
pid_t
pid
;
stralloc
sares
=
STRALLOC_ZERO
;
...
...
@@ -53,6 +55,20 @@ int rc_init(ssexec_t *info, char const *const *envp)
char
const
*
newargv
[
12
]
;
unsigned
int
m
=
0
;
gid_t
gidowner
;
if
(
!
yourgid
(
&
gidowner
,
info
->
owner
)){
VERBO1
strerr_warnwu1sys
(
"set gid"
)
;
goto
err
;
}
r
=
scan_mode
(
info
->
livetree
.
s
,
S_IFDIR
)
;
if
(
r
<
0
){
VERBO1
strerr_warnw2x
(
info
->
livetree
.
s
,
" conflicted format"
)
;
goto
err
;
}
if
(
!
r
)
{
VERBO2
strerr_warni2x
(
"create directory: "
,
info
->
livetree
.
s
)
;
r
=
dir_create
(
info
->
livetree
.
s
,
0700
)
;
if
(
!
r
){
VERBO1
strerr_warnwu2sys
(
"create directory: "
,
info
->
livetree
.
s
)
;
goto
err
;
}
VERBO2
strerr_warni2x
(
"chown directory: "
,
info
->
livetree
.
s
)
;
if
(
chown
(
info
->
livetree
.
s
,
info
->
owner
,
gidowner
)
<
0
){
VERBO1
strerr_warnwu2sys
(
"chown directory: "
,
info
->
livetree
.
s
)
;
goto
err
;
}
}
if
(
!
ss_resolve_pointo
(
&
sares
,
info
,
SS_NOTYPE
,
SS_RESOLVE_SRC
))
{
VERBO1
strerr_warnwu1x
(
"set revolve pointer to source"
)
;
goto
err
;
}
...
...
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