MCPcopy Create free account
hub / github.com/coreutils/coreutils / cached_umask

Function cached_umask

src/copy.c:2887–2899  ·  view source on GitHub ↗

Return the user's umask, caching the result. FIXME: If the destination's parent directory has has a default ACL, some operating systems (e.g., GNU/Linux's "POSIX" ACLs) use that ACL's mask rather than the process umask. Currently, the callers of cached_umask incorrectly assume that this situation cannot occur. */

Source from the content-addressed store, hash-verified

2885 ACL's mask rather than the process umask. Currently, the callers
2886 of cached_umask incorrectly assume that this situation cannot occur. */
2887extern mode_t
2888cached_umask (void)
2889{
2890 static mode_t mask;
2891 static bool cached;
2892 if (!cached)
2893 {
2894 cached = true;
2895 mask = umask (0);
2896 umask (mask);
2897 }
2898 return mask;
2899}

Callers 3

copy_regFunction · 0.85
copy_internalFunction · 0.85
make_dir_parents_privateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected