summaryrefslogtreecommitdiff
path: root/support/dktools/dk4fopc8.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-12 03:04:00 +0000
committerNorbert Preining <norbert@preining.info>2020-10-12 03:04:00 +0000
commit0ce40abb18ec02ec6fd6bcc5f21612c88daa7578 (patch)
tree416289fe1448873fd8ca33051f50ad85bffa8aaa /support/dktools/dk4fopc8.h
parentfdb18507cd80dc17f5a5256153d34668b4f4e61c (diff)
CTAN sync 202010120303
Diffstat (limited to 'support/dktools/dk4fopc8.h')
-rw-r--r--support/dktools/dk4fopc8.h141
1 files changed, 0 insertions, 141 deletions
diff --git a/support/dktools/dk4fopc8.h b/support/dktools/dk4fopc8.h
deleted file mode 100644
index c8779ae5d8..0000000000
--- a/support/dktools/dk4fopc8.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
-Copyright (C) 2015-2020, Dirk Krause
-SPDX-License-Identifier: BSD-3-Clause
-*/
-
-/*
- WARNING: This file was generated by the dkct program (see
- http://dktools.sourceforge.net/ for details).
- Changes you make here will be lost if dkct is run again!
- You should modify the original source and run dkct on it.
- Original source: dk4fopc8.ctr
-*/
-
-#ifndef DK4FOPC8_H_INCLUDED
-/** Avoid multiple inclusions. */
-#define DK4FOPC8_H_INCLUDED 1
-
-
-#line 10 "dk4fopc8.ctr"
-
-/** @file
- Open file, apply additional security
- checks before attempting to open the file.
-
- Attempts to open a directory as a file are rejected.
-
- Further optional checks can be applied to avoid:
- - writing to non-regular files,
- - writing to files with any symbolic link component in the path,
- - writing to files via symbolic link,
- - writing to files via symbolic link if link owner differs
- from file owner.
-*/
-
-#ifndef DK4CONF_H_INCLUDED
-#if DK4_BUILDING_DKTOOLS4
-#include "dk4conf.h"
-#else
-#include <dktools-4/dk4conf.h>
-#endif
-#endif
-
-#ifndef DK4TYPES_H_INCLUDED
-#if DK4_BUILDING_DKTOOLS4
-#include "dk4types.h"
-#else
-#include <dktools-4/dk4types.h>
-#endif
-#endif
-
-#ifndef DK4ERROR_H_INCLUDED
-#if DK4_BUILDING_DKTOOLS4
-#include "dk4error.h"
-#else
-#include <dktools-4/dk4error.h>
-#endif
-#endif
-
-#ifndef DK4NUMCO_H_INCLUDED
-#if DK4_BUILDING_DKTOOLS4
-#include "dk4numco.h"
-#else
-#include <dktools-4/dk4numco.h>
-#endif
-#endif
-
-#ifndef DK4FOPT_H_INCLUDED
-#if DK4_BUILDING_DKTOOLS4
-#include "dk4fopt.h"
-#else
-#include <dktools-4/dk4fopt.h>
-#endif
-#endif
-
-#ifndef STDIO_H_INCLUDED
-#include <stdio.h>
-#define STDIO_H_INCLUDED 1
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Open a file after doing security checks.
- CRT on Windows: Required.
- @param name File name to open.
- @param mode Opening mode.
- @param tests Set of tests.
- @param erp Error report, may be NULL.
- @return Pointer to open file on success, NULL on error.
-
- Error codes:
- - DK4_E_INVALID_ARGUMENTS<br>
- if name is NULL,
- - DK4_E_SYNTAX<br>
- if name does not refer to a regular file,
- - DK4_E_SEC_CHECK<br>
- with failed echek id (DK4_FOPEN_SC_WR_PATH_IS_SYMLINK or
- DK4_FOPEN_SC_WR_SYMLINK_OWNER) in iDetails1 if access is denied by
- additional security checks,
- - DK4_E_OPEN_WRITE_FAILED<br>
- or DK4_E_OPEN_READ_FAILED with errno value in iDetails1 if fopen()
- failed.
-
-*/
-FILE *
-dk4fopen_c8(const char *name, const char *mode, int tests, dk4_er_t *erp);
-
-/** Check whether we can allow to open the file.
- The file must be a regular file.
- Only POSIX: For root we deny opening for writing via symlink.
- For all users we deny opening for writing via symlink
- if the link owner is not the real file owner.
-
- CRT on Windows: Required.
- @param name File name to check.
- @param ww Flag: Write access wanted.
- @param tests Set of tests.
- @param erp Error report, may be NULL.
- @return 1 if opening the file is allowed, 0 otherwise.
-
- Error codes:
- - DK4_E_INVALID_ARGUMENTS<br>
- if name is NULL,
- - DK4_E_SYNTAX<br>
- if name is not a regular file,
- - DK4_E_SEC_CHECK<br>
- if access to a symlink target is denied symlink owner and target
- owner differ.
-
-*/
-int
-dk4fopen_check_c8(const char *name, int ww, int tests, dk4_er_t *erp);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-#endif