From 89d7866abbb25c45df73bc16676ea1570c07a823 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 3 Jun 2023 11:35:13 +0200 Subject: [PATCH] libos: Show the sticky bit on symbolic modes --- libos/src/Mode.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libos/src/Mode.cpp b/libos/src/Mode.cpp index 69e64a4b..431a6aea 100644 --- a/libos/src/Mode.cpp +++ b/libos/src/Mode.cpp @@ -27,8 +27,7 @@ namespace os out[6] = (mode & S_ISGID) ? ((mode & S_IXGRP) ? 's' : 'S') : ((mode & S_IXGRP) ? 'x' : '-'); out[7] = (mode & S_IROTH) ? 'r' : '-'; out[8] = (mode & S_IWOTH) ? 'w' : '-'; - // FIXME: Support the sticky bit. - out[9] = (mode & S_IXOTH) ? 'x' : '-'; + out[9] = (mode & S_ISVTX) ? ((mode & S_IXOTH) ? 't' : 'T') : ((mode & S_IXOTH) ? 'x' : '-'); out[10] = '\0'; } }