lib/modechange.h


Log

Author Commit Date CI Message
Paul Eggert 4e3c4c04 2006-07-28T07:39:27 * modechange.c (mode_compile): Numeric modes now affect setuid and setgid on directories only if they set these bits. * modechange.h: Remove obsolete comment about masks.
Paul Eggert 5f531596 2006-07-17T06:06:48 Import from coreutils. * MODULES.html.sh: Add mkancestors. * modules/mkancesdirs: New module. * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h, lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4. The chdir-safer and afs files are now orphans; I'll remove them unless someone speaks up. Add lib/dirchownmod.c, lib/dirchownmod.h. (Depends-on): Remove alloca, chown, save-cwd, dirname. Add lchown, mkancesdirs. (Maintainer): Add self. * lib/dirchownmod.c, lib/dirchownmod.h: * lib/mkancesdirs.c, lib/mkancesdirs.h: New files. * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h, unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h, save-cwd.h. Instead, include dirchownmod.h and mkancesdirs.h. (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE, MODE_BITS. Remove options VERBOSE_FMT_STRING, CWD_ERRNO. All callers changed. Revamp internals significantly, by not attempting to create directories that are temporarily more permissive than the final results. Do not attempt to use save_cwd/restore_cwd; it isn't worth it for mkdir and install. This removes some race conditions, fixes some bugs, and simplifies things. Use new dirchownmod function to do owner and mode changes. * lib/mkdir-p.h: Likewise. * lib/modechange.c (octal_to_mode): New function. (struct mode_change): New member mentioned. (make_node_op_equals): New arg mentioned. All callers changed. (mode_compile): Keep track of which mode bits the user has explicitly mentioned. (mode_adjust): New arg DIR, so that we implement the X op correctly. New arg PMODE_BITS, to keep track of which mode bits the user mentioned; it treats S_ISUID and S_ISGID speciall. All callers changed. * lib/modechange.h: Likewise. * mkancesdirs.m4: New file. * mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c, dirchownmod.h. Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER; no longer needed. Require gl_FUNC_LCHOWN, since dirchownmod.c needs it.
Paul Eggert 267a39ba 2005-05-14T06:03:57 *** empty log message ***
Paul Eggert 8b03458e 2005-05-02T07:00:50 Merge from coreutils.
Paul Eggert a62be9f4 2004-08-07T00:09:38 Merge from coreutils.
Paul Eggert 68af56be 2003-06-18T05:52:19 Assume C89, so PARAMS isn't needed.
Jim Meyering 89f2b489 2000-08-07T15:48:18 back out Copyright date changes for files with no changes year
Jim Meyering d349992d 2000-07-09T07:22:43 update copyright date
Jim Meyering 06b7dd0c 1999-04-26T13:13:59 Include <config.h>, <sys/types.h> for mode_t. (struct mode_change): Members affected and value are now mode_t instead of unsigned short.
Jim Meyering 358e52e8 1997-12-21T11:22:51 Use PARAMS, not __P.
Jim Meyering d260dd04 1997-07-06T21:27:44 (mode_create_from_ref): Add prototype. (MODE_MASK_ALL): New define. (MODE_BAD_REFERENCE): New define.
Jim Meyering 7c659d89 1996-10-29T14:25:15 .
Jim Meyering 5c4a5649 1996-10-29T14:24:52 .
Jim Meyering 783c1624 1996-07-15T03:56:06 indent cpp-directives
Jim Meyering 6d8337bf 1996-07-15T03:36:16 update FSF address in copyright
Jim Meyering a61e0df6 1996-05-16T03:58:44 Update prototypes.
Jim Meyering d87c3946 1992-10-31T20:42:48 Initial revision