1 /* 2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 ** Distributed under the terms of the Haiku License. 4 */ 5 6 7 #include <sys/stat.h> 8 #include <syscalls.h> 9 #include <errno.h> 10 11 12 mode_t __gUmask = 022; 13 // this must be made available to open() and friends 14 15 16 mode_t 17 umask(mode_t newMask) 18 { 19 mode_t oldMask = __gUmask; 20 __gUmask = newMask; 21 22 return oldMask; 23 } 24 25