branch | stable |
changeset 48312 | 7dd48d5da64f |
parent 48289 | 1ff06ceb070f |
child 48319 | 6505d3902eac |
--- a/tests/hghave.py Tue Nov 09 02:00:25 2021 +0100 +++ b/tests/hghave.py Tue Nov 09 02:08:18 2021 +0100 @@ -264,6 +264,13 @@ return not (new_file_has_exec or exec_flags_cannot_flip) +@check("suidbit", "setuid and setgid bit") +def has_suidbit(): + if getattr(os, "statvfs", None) is None or getattr(os, "ST_NOSUID") is None: + return False + return bool(os.statvfs('.').f_flag & os.ST_NOSUID) + + @check("icasefs", "case insensitive file system") def has_icasefs(): # Stolen from mercurial.util