From 17ec8c2e35348524b242992df449d80930ba0c9c Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Tue, 24 Sep 2024 17:45:30 +0300 Subject: [PATCH] Tune perm printing format --- common/network/websocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/network/websocket.c b/common/network/websocket.c index 7952479..2aa2ce0 100644 --- a/common/network/websocket.c +++ b/common/network/websocket.c @@ -1693,7 +1693,7 @@ static uint8_t ownerapi(ws_ctx_t *ws_ctx, const char *in, const char * const use continue; char own[LOGIN_NAME_MAX], grp[LOGIN_NAME_MAX], perms[32]; - sprintf(perms, "%o", st.st_mode & 0777); + sprintf(perms, "%03o", st.st_mode & 0777); struct passwd pwdt, *pwdptr; if (getpwuid_r(st.st_uid, &pwdt, buf, sizeof(buf), &pwdptr)) {