Make indent

This commit is contained in:
Robert Swiecki 2016-10-12 00:59:10 +02:00
parent 047c94e2d9
commit a30e2f107c
3 changed files with 28 additions and 23 deletions

3
log.c
View File

@ -54,7 +54,8 @@ bool logInitLogFile(struct nsjconf_t *nsjconf, const char *logfile, bool is_verb
if (logfile == NULL) {
log_fd = STDERR_FILENO;
} 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;
PLOG_E("Couldn't open logfile open('%s')", logfile);
return false;

14
user.c
View File

@ -54,7 +54,8 @@ static bool userSetGroups(pid_t pid)
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 map[128];
@ -70,7 +71,8 @@ static bool userUidMapSelf(struct nsjconf_t *nsjconf, pid_t pid) {
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 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
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_ptr = 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) {
LOG_E("system('%s') failed", cmd_buf);
while(1) ;
while (1) ;
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
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_ptr = cmd_buf;
size_t len = sizeof(cmd_buf);