/* -*-c-*-
*
- * $Id: tmpdir.c,v 1.3 1999/05/21 22:07:20 mdw Exp $
+ * $Id: tmpdir.c,v 1.4 2003/01/25 23:58:44 mdw Exp $
*
* Choose and check temporary directories
*
/*----- Revision history --------------------------------------------------*
*
* $Log: tmpdir.c,v $
+ * Revision 1.4 2003/01/25 23:58:44 mdw
+ * Make guts into official library.
+ *
* Revision 1.3 1999/05/21 22:07:20 mdw
* Take advantage of new dynamic string macros.
*
#include <mLib/quis.h>
#include <mLib/report.h>
-#include "path.h"
+#include "checkpath.h"
/*----- Static variables --------------------------------------------------*/
static uid_t me;
-static struct chkpath cp;
+static struct checkpath cp;
static struct passwd *pw;
/*----- Main code ---------------------------------------------------------*/
* safe.
*/
- if (path_check(parent, &cp))
+ if (checkpath(parent, &cp))
return (0);
/* --- See whether the trivial version will work --- */
static int fullcheck(const char *p)
{
- return (path_check(p, &cp) == 0 && ok(p, 0));
+ return (checkpath(p, &cp) == 0 && ok(p, 0));
}
/* --- @goodtmp@ --- *
cp.cp_what = CP_WRWORLD | CP_WRGRP | CP_WROTHUSR | CP_STICKYOK;
cp.cp_verbose = 0;
cp.cp_report = 0;
- path_setids(&cp);
+ checkpath_setids(&cp);
pw = getpwuid(me);
if (!pw)
die(1, "you don't exist");