cfengine  3.15.4
About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version.
  Fossies Dox: cfengine-3.15.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

definitions.h
Go to the documentation of this file.
1 /*
2  Copyright 2020 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_DEFINITIONS_H
26 #define CFENGINE_DEFINITIONS_H
27 
28 /*****************************************************************************
29  * Size related defines *
30  *****************************************************************************/
31 #define CF_MAXSIZE 102400000
32 #define CF_BILLION 1000000000L
33 
34 #define CF_BLOWFISHSIZE 16
35 #define CF_BUFFERMARGIN 128
36 #define CF_MAXVARSIZE 1024
37 #define CF_MAXSIDSIZE 2048 /* Windows only: Max size (bytes) of
38  security identifiers */
39 
40 // Limit database names and table names so they can be combined
41 // into CF_MAXVARSIZE without truncation
42 // NOTE: Databases like PostgreSQL and MySQL actually have stricter limits
43 #define CF_MAXTABLENAMESIZE 256
44 #define CF_MAXDBNAMESIZE 256
45 
46 /* Max size of plaintext in one transaction, see net.c:SendTransaction(),
47  leave space for encryption padding (assuming max 64*8 = 512-bit cipher
48  block size). */
49 #define CF_SMALLBUF 128
50 #define CF_BUFSIZE 4096
51 #define CF_EXPANDSIZE (2 * CF_BUFSIZE)
52 
53 
54 /*****************************************************************************
55  * File permissions *
56  *****************************************************************************/
57 // 0600 - Read/Write for owner
58 #define CF_PERMS_DEFAULT S_IRUSR | S_IWUSR
59 // 0644 - World readable
60 #define CF_PERMS_SHARED CF_PERMS_DEFAULT | S_IRGRP | S_IROTH
61 
62 #endif // CFENGINE_DEFINITIONS_H