Skip to content

Commit c32b5ba

Browse files
committed
Fix creation of RUN_DIR because it breaks rpm verify
Signed-off-by: Radovan Sroka <rsroka@redhat.com>
1 parent b97a123 commit c32b5ba

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/library/database.c

+13
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ int preconstruct_fifo(const conf_t *config)
122122
strerror_r(errno, err_buff, BUFFER_SIZE));
123123
return 1;
124124
} else {
125+
126+
if ((chmod(RUN_DIR, 0770))) {
127+
msg(LOG_ERR, "Failed to fix mode of dir %s (%s)",
128+
RUN_DIR, strerror_r(errno, err_buff, BUFFER_SIZE));
129+
return 1;
130+
}
131+
132+
if ((chown(RUN_DIR, 0, config->gid))) {
133+
msg(LOG_ERR, "Failed to fix ownership of dir %s (%s)",
134+
RUN_DIR, strerror_r(errno, err_buff, BUFFER_SIZE));
135+
return 1;
136+
}
137+
125138
/* Make sure that there is no such file/fifo */
126139
unlink_fifo();
127140
}

0 commit comments

Comments
 (0)