/* -*-c-*-
*
- * $Id: checkpath.c,v 1.3 1999/05/21 22:07:20 mdw Exp $
+ * $Id: checkpath.c,v 1.4 2001/01/25 22:16:02 mdw Exp $
*
* Check a path for safety
*
/*----- Revision history --------------------------------------------------*
*
* $Log: checkpath.c,v $
+ * Revision 1.4 2001/01/25 22:16:02 mdw
+ * Make flags be unsigned.
+ *
* Revision 1.3 1999/05/21 22:07:20 mdw
* Take advantage of new dynamic string macros.
*
char e_name[1]; /* Name of the directory */
};
-enum {
- f_sticky = 1 /* Directory has sticky bit set */
-};
+#define f_sticky 1u /* Directory has sticky bit set */
-enum {
- f_last = 1 /* This is the final item to check */
-};
+#define f_last 1u /* This is the final item to check */
/*----- Static variables --------------------------------------------------*/
/* -*-c-*-
*
- * $Id: checkpath.h,v 1.1 1999/04/06 20:12:07 mdw Exp $
+ * $Id: checkpath.h,v 1.2 2001/01/25 22:16:02 mdw Exp $
*
* Check a path for safety
*
/*----- Revision history --------------------------------------------------*
*
* $Log: checkpath.h,v $
- * Revision 1.1 1999/04/06 20:12:07 mdw
- * Initial revision
+ * Revision 1.2 2001/01/25 22:16:02 mdw
+ * Make flags be unsigned.
+ *
+ * Revision 1.1.1.1 1999/04/06 20:12:07 mdw
+ * Import new project.
*
*/
gid_t cp_gid[NGROUPS_MAX + 1]; /* Array of groups that are OK */
int cp_gids; /* Number of groups in the array */
int cp_verbose; /* Verbosity level to spit up */
- int cp_what; /* What things to check for */
+ unsigned cp_what; /* What things to check for */
void (*cp_report)(int /*what*/, int /*verb*/,
const char */*dir*/, const char */*msg*/,
void */*p*/);
/* --- Flags for `@what@' fields in the above --- */
-#define CP_ERROR 1 /* Error report */
-#define CP_WRWORLD 2 /* Check write by world */
-#define CP_WRGRP 4 /* Check write by any group */
-#define CP_WROTHGRP 8 /* Check write by other group */
-#define CP_WROTHUSR 16 /* Check write by other user */
-#define CP_SYMLINK 32 /* Report symbolic links */
-#define CP_REPORT 64 /* Make user-readable reports */
-#define CP_STICKYOK 128 /* Don't care if sticky is set */
+#define CP_ERROR 1u /* Error report */
+#define CP_WRWORLD 2u /* Check write by world */
+#define CP_WRGRP 4u /* Check write by any group */
+#define CP_WROTHGRP 8u /* Check write by other group */
+#define CP_WROTHUSR 16u /* Check write by other user */
+#define CP_SYMLINK 32u /* Report symbolic links */
+#define CP_REPORT 64u /* Make user-readable reports */
+#define CP_STICKYOK 128u /* Don't care if sticky is set */
/*----- Functions provided ------------------------------------------------*/
/* -*-c-*-
*
- * $Id: chkpath.c,v 1.1 1999/04/06 20:12:07 mdw Exp $
+ * $Id: chkpath.c,v 1.2 2001/01/25 22:16:02 mdw Exp $
*
* Check a user's file search path
*
/*----- Revision history --------------------------------------------------*
*
* $Log: chkpath.c,v $
- * Revision 1.1 1999/04/06 20:12:07 mdw
- * Initial revision
+ * Revision 1.2 2001/01/25 22:16:02 mdw
+ * Make flags be unsigned.
+ *
+ * Revision 1.1.1.1 1999/04/06 20:12:07 mdw
+ * Import new project.
*
*/
struct chkpath cp;
int f = 0;
- enum {
- f_print = 1,
- f_colon = 2
- };
+#define f_print 1u
+#define f_colon 2u
/* --- Initialize the world --- */
/* -*-c-*-
*
- * $Id: path.c,v 1.3 1999/05/21 22:07:20 mdw Exp $
+ * $Id: path.c,v 1.4 2001/01/25 22:16:02 mdw Exp $
*
* Check a path for safety
*
/*----- Revision history --------------------------------------------------*
*
* $Log: path.c,v $
+ * Revision 1.4 2001/01/25 22:16:02 mdw
+ * Make flags be unsigned.
+ *
* Revision 1.3 1999/05/21 22:07:20 mdw
* Take advantage of new dynamic string macros.
*
char e_name[1]; /* Name of the directory */
};
-enum {
- f_sticky = 1 /* Directory has sticky bit set */
-};
+#define f_sticky 1u /* Directory has sticky bit set */
-enum {
- f_last = 1 /* This is the final item to check */
-};
+#define f_last 1u /* This is the final item to check */
/*----- Static variables --------------------------------------------------*/
/* -*-c-*-
*
- * $Id: path.h,v 1.1 1999/04/06 20:12:07 mdw Exp $
+ * $Id: path.h,v 1.2 2001/01/25 22:16:02 mdw Exp $
*
* Check a path for safety
*
/*----- Revision history --------------------------------------------------*
*
* $Log: path.h,v $
- * Revision 1.1 1999/04/06 20:12:07 mdw
- * Initial revision
+ * Revision 1.2 2001/01/25 22:16:02 mdw
+ * Make flags be unsigned.
+ *
+ * Revision 1.1.1.1 1999/04/06 20:12:07 mdw
+ * Import new project.
*
*/
gid_t cp_gid[NGROUPS_MAX + 1]; /* Array of groups that are OK */
int cp_gids; /* Number of groups in the array */
int cp_verbose; /* Verbosity level to spit up */
- int cp_what; /* What things to check for */
+ unsigned cp_what; /* What things to check for */
void (*cp_report)(int /*what*/, int /*verb*/,
const char */*dir*/, const char */*msg*/,
void */*p*/);
/* --- Flags for `@what@' fields in the above --- */
-#define CP_ERROR 1 /* Error report */
-#define CP_WRWORLD 2 /* Check write by world */
-#define CP_WRGRP 4 /* Check write by any group */
-#define CP_WROTHGRP 8 /* Check write by other group */
-#define CP_WROTHUSR 16 /* Check write by other user */
-#define CP_SYMLINK 32 /* Report symbolic links */
-#define CP_REPORT 64 /* Make user-readable reports */
-#define CP_STICKYOK 128 /* Don't care if sticky is set */
+#define CP_ERROR 1u /* Error report */
+#define CP_WRWORLD 2u /* Check write by world */
+#define CP_WRGRP 4u /* Check write by any group */
+#define CP_WROTHGRP 8u /* Check write by other group */
+#define CP_WROTHUSR 16u /* Check write by other user */
+#define CP_SYMLINK 32u /* Report symbolic links */
+#define CP_REPORT 64u /* Make user-readable reports */
+#define CP_STICKYOK 128u /* Don't care if sticky is set */
/*----- Functions provided ------------------------------------------------*/