Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/tlshd/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@

static GKeyFile *tlshd_configuration;

/**
* ALLPERMS exists in glibc, but not on musl, so we
* manually define TLSHD_ACCESSPERMS instead of using ALLPERMS.
*/
#define TLSHD_ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)

/**
* tlshd_config_init - Read tlshd's config file
* @pathname: Pathname to config file
Expand Down Expand Up @@ -149,7 +155,7 @@ static bool tlshd_config_read_datum(const char *pathname, gnutls_datum_t *data,
if (statbuf.st_uid != owner)
tlshd_log_notice("File %s: expected owner %u",
pathname, owner);
if ((statbuf.st_mode & ALLPERMS) != mode)
if ((statbuf.st_mode & TLSHD_ACCESSPERMS) != mode)
tlshd_log_notice("File %s: expected mode %o",
pathname, mode);
buf = malloc(size);
Expand Down