Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
361e0e3c
Commit
361e0e3c
authored
Aug 22, 2014
by
S.Çağlar Onur
Committed by
Stéphane Graber
Aug 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use lxcpath as unprivileged containers log directory
Signed-off-by:
S.Çağlar Onur
<
caglar@10ur.org
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
614305f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
log.c
src/lxc/log.c
+2
-7
No files found.
src/lxc/log.c
View file @
361e0e3c
...
@@ -329,11 +329,6 @@ extern int lxc_log_init(const char *name, const char *file,
...
@@ -329,11 +329,6 @@ extern int lxc_log_init(const char *name, const char *file,
return
0
;
return
0
;
ret
=
__lxc_log_set_file
(
file
,
1
);
ret
=
__lxc_log_set_file
(
file
,
1
);
}
else
{
}
else
{
/* For now, unprivileged containers have to set -l to get logging */
if
(
geteuid
())
return
0
;
/* if no name was specified, there nothing to do */
/* if no name was specified, there nothing to do */
if
(
!
name
)
if
(
!
name
)
return
0
;
return
0
;
...
@@ -343,8 +338,8 @@ extern int lxc_log_init(const char *name, const char *file,
...
@@ -343,8 +338,8 @@ extern int lxc_log_init(const char *name, const char *file,
if
(
!
lxcpath
)
if
(
!
lxcpath
)
lxcpath
=
LOGPATH
;
lxcpath
=
LOGPATH
;
/* try LOGPATH if lxcpath is the default */
/* try LOGPATH if lxcpath is the default
for the privileged containers
*/
if
(
strcmp
(
lxcpath
,
lxc_global_config_value
(
"lxc.lxcpath"
))
==
0
)
if
(
!
geteuid
()
&&
strcmp
(
lxcpath
,
lxc_global_config_value
(
"lxc.lxcpath"
))
==
0
)
ret
=
_lxc_log_set_file
(
name
,
NULL
,
0
);
ret
=
_lxc_log_set_file
(
name
,
NULL
,
0
);
/* try in lxcpath */
/* try in lxcpath */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment