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
c05ad008
Unverified
Commit
c05ad008
authored
Aug 25, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macro: add LXC_AUDS_ADDR_LEN
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
253a7210
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
commands.c
src/lxc/commands.c
+1
-1
commands_utils.c
src/lxc/commands_utils.c
+1
-1
macro.h
src/lxc/macro.h
+4
-0
No files found.
src/lxc/commands.c
View file @
c05ad008
...
...
@@ -1239,7 +1239,7 @@ out_close:
int
lxc_cmd_init
(
const
char
*
name
,
const
char
*
lxcpath
,
const
char
*
suffix
)
{
int
fd
,
len
,
ret
;
char
path
[
sizeof
(((
struct
sockaddr_un
*
)
0
)
->
sun_path
)
]
=
{
0
};
char
path
[
LXC_AUDS_ADDR_LEN
]
=
{
0
};
char
*
offset
=
&
path
[
1
];
/* -2 here because this is an abstract unix socket so it needs a
...
...
src/lxc/commands_utils.c
View file @
c05ad008
...
...
@@ -162,7 +162,7 @@ int lxc_cmd_connect(const char *name, const char *lxcpath,
const
char
*
hashed_sock_name
,
const
char
*
suffix
)
{
int
ret
,
client_fd
;
char
path
[
sizeof
(((
struct
sockaddr_un
*
)
0
)
->
sun_path
)
]
=
{
0
};
char
path
[
LXC_AUDS_ADDR_LEN
]
=
{
0
};
char
*
offset
=
&
path
[
1
];
/* -2 here because this is an abstract unix socket so it needs a
...
...
src/lxc/macro.h
View file @
c05ad008
...
...
@@ -30,6 +30,7 @@
#include <string.h>
#include <sys/mount.h>
#include <sys/socket.h>
#include <sys/un.h>
/* Define __S_ISTYPE if missing from the C library. */
#ifndef __S_ISTYPE
...
...
@@ -238,6 +239,9 @@ extern int __build_bug_on_failed;
#define MACVLAN_MODE_PASSTHRU 8
#endif
/* Length of abstract unix domain socket socket address. */
#define LXC_AUDS_ADDR_LEN sizeof(((struct sockaddr_un *)0)->sun_path)
/* mount */
#ifndef MS_REC
#define MS_REC 16384
...
...
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