Changeset 1710 for trunk/src/kmk/kmkbuiltin/setmode.c
- Timestamp:
- Sep 2, 2008, 11:50:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kmkbuiltin/setmode.c
r616 r1710 55 55 #else 56 56 #include "mscfakes.h" 57 #endif 57 #endif 58 58 59 59 #ifdef SETMODE_DEBUG … … 89 89 #ifndef _DIAGASSERT 90 90 # define _DIAGASSERT assert 91 #endif 91 #endif 92 92 93 93 #ifndef S_ISTXT … … 106 106 */ 107 107 mode_t 108 getmode(bbox, omode)108 bsd_getmode(bbox, omode) 109 109 const void *bbox; 110 110 mode_t omode; … … 196 196 197 197 void * 198 setmode(p)198 bsd_setmode(p) 199 199 const char *p; 200 200 { … … 221 221 sigfillset(&signset); 222 222 (void)sigprocmask(SIG_BLOCK, &signset, &sigoset); 223 #endif 223 #endif 224 224 (void)umask(mask = umask(0)); 225 225 mask = ~mask; … … 229 229 230 230 setlen = SET_LEN + 2; 231 231 232 232 if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL) 233 233 return (NULL); … … 290 290 case 's': 291 291 /* 292 * If specific bits where requested and 293 * only "other" bits ignore set-id. 292 * If specific bits where requested and 293 * only "other" bits ignore set-id. 294 294 */ 295 295 if (who == 0 || (who & ~S_IRWXO)) … … 298 298 case 't': 299 299 /* 300 * If specific bits where requested and 301 * only "other" bits ignore set-id. 300 * If specific bits where requested and 301 * only "other" bits ignore set-id. 302 302 */ 303 303 if (who == 0 || (who & ~S_IRWXO)) { … … 412 412 set->bits = mask; 413 413 } 414 414 415 415 if (oparg == '+') 416 416 set->cmd2 |= CMD2_SET; … … 446 446 * Given an array of bitcmd structures, compress by compacting consecutive 447 447 * '+', '-' and 'X' commands into at most 3 commands, one of each. The 'u', 448 * 'g' and 'o' commands continue to be separate. They could probably be 448 * 'g' and 'o' commands continue to be separate. They could probably be 449 449 * compacted, but it's not worth the effort. 450 450 */
Note:
See TracChangeset
for help on using the changeset viewer.