summaryrefslogtreecommitdiffstats
path: root/usr.sbin/edquota
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2013-04-21 12:33:06 +0000
committerjsing <jsing@openbsd.org>2013-04-21 12:33:06 +0000
commit397d991795f90a1cd5534bddbf1324e14de2329f (patch)
treec557a3a60d00295f291bd85de66b122142eb3486 /usr.sbin/edquota
parentCheck both f_mntfromname and f_mntfromspec when looking for a mounted (diff)
downloadwireguard-openbsd-397d991795f90a1cd5534bddbf1324e14de2329f.tar.xz
wireguard-openbsd-397d991795f90a1cd5534bddbf1324e14de2329f.zip
Unbreak edquota by fixing the temporary file name template. Whilst here,
fold pathnames.h into edquota.c - we do not really need a header file for a single define. ok deraadt@ guenther@ millert@
Diffstat (limited to 'usr.sbin/edquota')
-rw-r--r--usr.sbin/edquota/edquota.c9
-rw-r--r--usr.sbin/edquota/pathnames.h35
2 files changed, 5 insertions, 39 deletions
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c
index 732ebd245e9..6e6c9ab048f 100644
--- a/usr.sbin/edquota/edquota.c
+++ b/usr.sbin/edquota/edquota.c
@@ -38,23 +38,24 @@
#include <sys/file.h>
#include <sys/wait.h>
#include <ufs/ufs/quota.h>
+
+#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fstab.h>
-#include <pwd.h>
#include <grp.h>
-#include <ctype.h>
+#include <paths.h>
+#include <pwd.h>
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include "pathnames.h"
char *qfname = QUOTAFILENAME;
char *qfextension[] = INITQFNAMES;
char *quotagroup = QUOTAGROUP;
-char tmpfil[] = _PATH_TMPFILE;
+char tmpfil[] = "/tmp/edquota.XXXXXXXXXX";
struct quotause {
struct quotause *next;
diff --git a/usr.sbin/edquota/pathnames.h b/usr.sbin/edquota/pathnames.h
deleted file mode 100644
index 70c6adeda07..00000000000
--- a/usr.sbin/edquota/pathnames.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)pathnames.h 8.1 (Berkeley) 6/6/93
- * $Id: pathnames.h,v 1.3 2003/06/02 23:36:53 millert Exp $
- */
-
-#include <paths.h>
-
-#define _PATH_TMPFILE "/tmp/EdP.aXXXXX"