"Fossies" - the Fresh Open Source Software Archive

Member "cfengine-3.15.4/cf-agent/verify_files_utils.h" (7 Jun 2021, 2651 Bytes) of package /linux/misc/cfengine-3.15.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2   Copyright 2019 Northern.tech AS
    3 
    4   This file is part of CFEngine 3 - written and maintained by Northern.tech AS.
    5 
    6   This program is free software; you can redistribute it and/or modify it
    7   under the terms of the GNU General Public License as published by the
    8   Free Software Foundation; version 3.
    9 
   10   This program is distributed in the hope that it will be useful,
   11   but WITHOUT ANY WARRANTY; without even the implied warranty of
   12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13   GNU General Public License for more details.
   14 
   15   You should have received a copy of the GNU General Public License
   16   along with this program; if not, write to the Free Software
   17   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
   18 
   19   To the extent this program is licensed as part of the Enterprise
   20   versions of CFEngine, the applicable Commercial Open Source License
   21   (COSL) may apply to this file if you as a licensee so wish it. See
   22   included file COSL.txt.
   23 */
   24 
   25 #ifndef CFENGINE_VERIFY_FILES_UTILS_H
   26 #define CFENGINE_VERIFY_FILES_UTILS_H
   27 
   28 #include <cf3.defs.h>
   29 #include <cfnet.h>                                       /* AgentConnection */
   30 #include <comparray.h>
   31 
   32 extern const Rlist *SINGLE_COPY_LIST;
   33 extern StringSet *SINGLE_COPY_CACHE;
   34 
   35 void SetFileAutoDefineList(const Rlist *auto_define_list);
   36 
   37 void VerifyFileLeaf(EvalContext *ctx, char *path, const struct stat *sb, const Attributes *attr, const Promise *pp, PromiseResult *result);
   38 bool DepthSearch(EvalContext *ctx, char *name, const struct stat *sb, int rlevel, const Attributes *attr, const Promise *pp, dev_t rootdevice, PromiseResult *result);
   39 bool CfCreateFile(EvalContext *ctx, char *file, const Promise *pp, const Attributes *attr, PromiseResult *result_out);
   40 void SetSearchDevice(struct stat *sb, const Promise *pp);
   41 
   42 PromiseResult ScheduleCopyOperation(EvalContext *ctx, char *destination, const Attributes *attr, const Promise *pp);
   43 PromiseResult ScheduleLinkChildrenOperation(EvalContext *ctx, char *destination, char *source, int rec, const Attributes *attr, const Promise *pp);
   44 PromiseResult ScheduleLinkOperation(EvalContext *ctx, char *destination, char *source, const Attributes *attr, const Promise *pp);
   45 
   46 bool CopyRegularFile(EvalContext *ctx, const char *source, const char *dest, const struct stat *sstat,
   47                      const Attributes *attr, const Promise *pp, CompressedArray **inode_cache, AgentConnection *conn, PromiseResult *result);
   48 
   49 /* To be implemented in Nova for Win32 */
   50 bool VerifyOwner(EvalContext *ctx, const char *file, const Promise *pp, const Attributes *attr, const struct stat *sb, PromiseResult *result);
   51 
   52 #endif