Make indent
This commit is contained in:
parent
047c94e2d9
commit
a30e2f107c
3
log.c
3
log.c
@ -54,7 +54,8 @@ bool logInitLogFile(struct nsjconf_t *nsjconf, const char *logfile, bool is_verb
|
|||||||
if (logfile == NULL) {
|
if (logfile == NULL) {
|
||||||
log_fd = STDERR_FILENO;
|
log_fd = STDERR_FILENO;
|
||||||
} else {
|
} else {
|
||||||
if (TEMP_FAILURE_RETRY(log_fd = open(logfile, O_CREAT | O_RDWR | O_APPEND, 0640)) == -1) {
|
if (TEMP_FAILURE_RETRY(log_fd = open(logfile, O_CREAT | O_RDWR | O_APPEND, 0640)) ==
|
||||||
|
-1) {
|
||||||
log_fd = STDERR_FILENO;
|
log_fd = STDERR_FILENO;
|
||||||
PLOG_E("Couldn't open logfile open('%s')", logfile);
|
PLOG_E("Couldn't open logfile open('%s')", logfile);
|
||||||
return false;
|
return false;
|
||||||
|
14
user.c
14
user.c
@ -54,7 +54,8 @@ static bool userSetGroups(pid_t pid)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool userUidMapSelf(struct nsjconf_t *nsjconf, pid_t pid) {
|
static bool userUidMapSelf(struct nsjconf_t *nsjconf, pid_t pid)
|
||||||
|
{
|
||||||
char fname[PATH_MAX];
|
char fname[PATH_MAX];
|
||||||
char map[128];
|
char map[128];
|
||||||
|
|
||||||
@ -70,7 +71,8 @@ static bool userUidMapSelf(struct nsjconf_t *nsjconf, pid_t pid) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool userGidMapSelf(struct nsjconf_t *nsjconf, pid_t pid) {
|
static bool userGidMapSelf(struct nsjconf_t *nsjconf, pid_t pid)
|
||||||
|
{
|
||||||
char fname[PATH_MAX];
|
char fname[PATH_MAX];
|
||||||
char map[128];
|
char map[128];
|
||||||
|
|
||||||
@ -86,7 +88,8 @@ static bool userGidMapSelf(struct nsjconf_t *nsjconf, pid_t pid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// use /usr/bin/newgidmap for writing the uid and gid map
|
// use /usr/bin/newgidmap for writing the uid and gid map
|
||||||
static bool userGidMapExternal(struct nsjconf_t *nsjconf, pid_t pid) {
|
static bool userGidMapExternal(struct nsjconf_t *nsjconf, pid_t pid)
|
||||||
|
{
|
||||||
char cmd_buf[1024];
|
char cmd_buf[1024];
|
||||||
char *cmd_ptr = cmd_buf;
|
char *cmd_ptr = cmd_buf;
|
||||||
size_t len = sizeof(cmd_buf);
|
size_t len = sizeof(cmd_buf);
|
||||||
@ -117,7 +120,7 @@ static bool userGidMapExternal(struct nsjconf_t *nsjconf, pid_t pid) {
|
|||||||
|
|
||||||
if (system(cmd_buf) != 0) {
|
if (system(cmd_buf) != 0) {
|
||||||
LOG_E("system('%s') failed", cmd_buf);
|
LOG_E("system('%s') failed", cmd_buf);
|
||||||
while(1) ;
|
while (1) ;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +128,8 @@ static bool userGidMapExternal(struct nsjconf_t *nsjconf, pid_t pid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// use /usr/bin/newuidmap for writing the uid and gid map
|
// use /usr/bin/newuidmap for writing the uid and gid map
|
||||||
static bool userUidMapExternal(struct nsjconf_t *nsjconf, pid_t pid) {
|
static bool userUidMapExternal(struct nsjconf_t *nsjconf, pid_t pid)
|
||||||
|
{
|
||||||
char cmd_buf[1024];
|
char cmd_buf[1024];
|
||||||
char *cmd_ptr = cmd_buf;
|
char *cmd_ptr = cmd_buf;
|
||||||
size_t len = sizeof(cmd_buf);
|
size_t len = sizeof(cmd_buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user