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)  

platform.h File Reference
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include <stddef.h>
#include <strings.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <pthread.h>
#include <../libcompat/getopt.h>
#include <stdbool.h>
#include <errno.h>
#include <signal.h>
#include <syslog.h>
#include <fcntl.h>
#include <time.h>
#include <pwd.h>
#include <grp.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/protosw.h>
#include <net/route.h>
#include <condition_macros.h>
#include <deprecated.h>
#include <>
Include dependency graph for platform.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  utsname
struct  glob_t


#define _GNU_SOURCE   1
#define MAX_FILENAME   254
#define _SYS_NMLN   257
#define WEXITSTATUS(s)   ((unsigned)(s) >> 8)
#define WIFEXITED(s)   (((s) & 255) == 0)
#define WIFSIGNALED(s)   ((s) & 0) /* Can't use for BSD */
#define WTERMSIG(s)   ((s) & 0)
#define dirent   direct
#define PATH_MAX   4096
#define GLOB_NOSPACE   1
#define GLOB_ABORTED   2
#define GLOB_NOMATCH   3
#define CLOCK_REALTIME   1
#define le32toh(x)   (x)
#define htole32(x)   (x)
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define INADDR_NONE   ((unsigned long int) 0xffffffff)
#define sockaddr_storage   sockaddr
#define AF_INET6   -1
#define AI_NUMERICSERV   -1
#define _stat64(name, st)   rpl_stat(name, st)
#define NGROUPS   20
#define AT_SYMLINK_NOFOLLOW   0x1000
#define AT_FDCWD   (-2)
#define ENOLINK   123456
#define DEV_BSIZE   512
#define ST_BLKSIZE(statbuf)   DEV_BSIZE
#define ST_NBLOCKS(statbuf)   (((statbuf).st_size + DEV_BSIZE - 1) / DEV_BSIZE)
#define ST_NBYTES(statbuf)   (ST_NBLOCKS(statbuf) * DEV_BSIZE)
#define SEEK_CUR   1
#define S_IFBLK   0060000
#define S_IFCHR   0020000
#define S_IFDIR   0040000
#define S_IFIFO   0010000
#define S_IFREG   0100000
#define S_IFLNK   0120000
#define S_IFSOCK   0140000
#define S_IFMT   00170000
#define S_ISREG(m)   (((m) & S_IFMT) == S_IFREG)
#define S_ISDIR(m)   (((m) & S_IFMT) == S_IFDIR)
#define S_ISLNK(m)   (((m) & S_IFMT) == S_IFLNK)
#define S_ISFIFO(m)   (((m) & S_IFMT) == S_IFIFO)
#define S_ISCHR(m)   (((m) & S_IFMT) == S_IFCHR)
#define S_ISBLK(m)   (((m) & S_IFMT) == S_IFBLK)
#define S_ISSOCK(m)   (((m) & S_IFMT) == S_IFSOCK)
#define S_IRWXU   00700
#define S_IRUSR   00400
#define S_IWUSR   00200
#define S_IXUSR   00100
#define S_IRWXG   00070
#define S_IRGRP   00040
#define S_IWGRP   00020
#define S_IXGRP   00010
#define S_IRWXO   00007
#define S_IROTH   00004
#define S_IWOTH   00002
#define S_IXOTH   00001
#define NI_MAXHOST   1025
#define UF_NODUMP   0
#define UF_IMMUTABLE   0
#define UF_APPEND   0
#define UF_OPAQUE   0
#define UF_NOUNLINK   0
#define SF_ARCHIVED   0
#define SF_IMMUTABLE   0
#define SF_APPEND   0
#define SF_NOUNLINK   0
#define O_BINARY   0
#define O_TEXT   0


typedef int clockid_t
typedef int socklen_t


int dirfd (DIR *dirp)
char * strndup (const char *s, size_t n)
size_t strnlen (const char *str, size_t maxlen)
size_t strlcpy (char *destination, const char *source, size_t size)
size_t strlcat (char *destination, const char *source, size_t size)
char * strsep (char **stringp, const char *delim)
int socketpair (int domain, int type, int protocol, int sv[2])
int fsync (int fd)
int glob (const char *pattern, int flags, int(*errfunc)(const char *epath, int eerrno), glob_t *pglob)
void globfree (glob_t *pglob)
int getloadavg (double loadavg[], int nelem)
static uint32_t ByteSwap32 (uint32_t le32uint)
int closefrom (int fd)
int pthread_attr_setstacksize (pthread_attr_t *attr, size_t stacksize)
int setegid (gid_t gid)
int uname (struct utsname *buf)
uid_t getuid (void)
gid_t getgid (void)
struct group * fgetgrent (FILE *stream)
double drand48 (void)
void srand48 (long seed)
int clock_gettime (clockid_t clock_id, struct timespec *tp)
int lstat (const char *file_name, struct stat *buf)
unsigned int sleep (unsigned int seconds)
double round (double x)
int nanosleep (const struct timespec *req, struct timespec *rem)
int chown (const char *path, uid_t owner, gid_t group)
int fchmod (int fd, mode_t mode)
int getnetgrent (char **host, char **user, char **domain)
void setnetgrent (const char *netgroup)
void endnetgrent (void)
char * strstr (const char *haystack, const char *needle)
char * strcasestr (const char *haystack, const char *needle)
int strcasecmp (const char *s1, const char *s2)
int strncasecmp (const char *s1, const char *s2, size_t n)
char * strsignal (int sig)
char * strdup (const char *str)
void * memrchr (const void *s, int c, size_t n)
void * memdup (const void *mem, size_t size)
void * memmem (const void *haystack, size_t haystacklen, const void *needle, size_t needlelen)
char * strerror (int err)
int unsetenv (const char *name)
int seteuid (uid_t euid)
void setlinebuf (FILE *stream)
ssize_t getline (char **lineptr, size_t *n, FILE *stream)
char * strchrnul (const char *s, int c)
struct tm * gmtime_r (const time_t *timep, struct tm *result)
struct tm * localtime_r (const time_t *timep, struct tm *result)
int chmod (const char *path, mode_t mode)
unsigned int alarm (unsigned int seconds)
char * mkdtemp (char *template)
char * strrstr (const char *haystack, const char *needle)
char * stpncpy (char *dst, const char *src, size_t len)
const char * inet_ntop (int af, const void *src, char *dst, socklen_t size)
int inet_pton (int af, const char *src, void *dst)
int getaddrinfo (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
void freeaddrinfo (struct addrinfo *res)
int getnameinfo (const struct sockaddr *sa, socklen_t salen, char *node, socklen_t nodelen, char *service, socklen_t servicelen, int flags)
const char * gai_strerror (int errcode)
int rpl_mkdir (const char *pathname, mode_t mode)
int rpl_stat (const char *path, struct stat *buf)
int rpl_rename (const char *oldpath, const char *newpath)
char * rpl_ctime (const time_t *t)
int openat (int dirfd, const char *pathname, int flags,...)
int fstatat (int dirfd, const char *pathname, struct stat *buf, int flags)
int fchownat (int dirfd, const char *pathname, uid_t owner, gid_t group, int flags)
int fchmodat (int dirfd, const char *pathname, mode_t mode, int flags)
int readlinkat (int dirfd, const char *pathname, char *buf, size_t bufsiz)
double log2 (double x)

Macro Definition Documentation


#define _GNU_SOURCE   1

Definition at line 39 of file platform.h.



Definition at line 423 of file platform.h.

◆ _stat64

#define _stat64 (   name,
)    rpl_stat(name, st)

Definition at line 708 of file platform.h.


#define _SYS_NMLN   257

Definition at line 104 of file platform.h.


#define AF_INET6   -1

Definition at line 695 of file platform.h.


#define AI_NUMERICSERV   -1

Definition at line 699 of file platform.h.



Definition at line 407 of file platform.h.


#define AT_FDCWD   (-2)

Definition at line 742 of file platform.h.


#define AT_SYMLINK_NOFOLLOW   0x1000

Definition at line 739 of file platform.h.


Definition at line 996 of file platform.h.


#define CLOCK_REALTIME   1

Definition at line 411 of file platform.h.


#define DEV_BSIZE   512

DEV_BSIZE is 512 for most common platforms (Linux, AIX on Power, Solaris etc).

Exceptions: HP-UX: 1024 AIX on PS/2: 4096 Windows: undefined

Definition at line 828 of file platform.h.

◆ dirent

#define dirent   direct

Definition at line 160 of file platform.h.


#define ENOLINK   123456

Definition at line 808 of file platform.h.



Definition at line 802 of file platform.h.



Definition at line 798 of file platform.h.



Definition at line 794 of file platform.h.



Definition at line 957 of file platform.h.


#define GLOB_ABORTED   2

Definition at line 278 of file platform.h.


#define GLOB_NOMATCH   3

Definition at line 279 of file platform.h.


#define GLOB_NOSPACE   1

Definition at line 277 of file platform.h.

◆ htole32

#define htole32 (   x)    (x)

Definition at line 455 of file platform.h.


#define INADDR_NONE   ((unsigned long int) 0xffffffff)

Definition at line 486 of file platform.h.

◆ le32toh

#define le32toh (   x)    (x)

Definition at line 454 of file platform.h.


#define MAX (   a,
)    ((a) > (b) ? (a) : (b))

Definition at line 482 of file platform.h.


#define MAX_FILENAME   254

Definition at line 51 of file platform.h.


#define MIN (   a,
)    ((a) < (b) ? (a) : (b))

Definition at line 478 of file platform.h.


#define NGROUPS   20

Definition at line 720 of file platform.h.


#define NI_MAXHOST   1025

Definition at line 962 of file platform.h.


#define O_BINARY   0

Definition at line 1001 of file platform.h.


#define O_TEXT   0

Definition at line 1005 of file platform.h.


#define PATH_MAX   4096

Definition at line 176 of file platform.h.



Definition at line 427 of file platform.h.


#define S_IFBLK   0060000

Definition at line 888 of file platform.h.


#define S_IFCHR   0020000

Definition at line 891 of file platform.h.


#define S_IFDIR   0040000

Definition at line 894 of file platform.h.


#define S_IFIFO   0010000

Definition at line 897 of file platform.h.


#define S_IFLNK   0120000

Definition at line 903 of file platform.h.


#define S_IFMT   00170000

Definition at line 909 of file platform.h.


#define S_IFREG   0100000

Definition at line 900 of file platform.h.


#define S_IFSOCK   0140000

Definition at line 906 of file platform.h.


#define S_IRGRP   00040

Definition at line 943 of file platform.h.


#define S_IROTH   00004

Definition at line 950 of file platform.h.


#define S_IRUSR   00400

Definition at line 936 of file platform.h.


#define S_IRWXG   00070

Definition at line 942 of file platform.h.


#define S_IRWXO   00007

Definition at line 949 of file platform.h.


#define S_IRWXU   00700

Definition at line 935 of file platform.h.


#define S_ISBLK (   m)    (((m) & S_IFMT) == S_IFBLK)

Definition at line 928 of file platform.h.


#define S_ISCHR (   m)    (((m) & S_IFMT) == S_IFCHR)

Definition at line 925 of file platform.h.


#define S_ISDIR (   m)    (((m) & S_IFMT) == S_IFDIR)

Definition at line 916 of file platform.h.


#define S_ISFIFO (   m)    (((m) & S_IFMT) == S_IFIFO)

Definition at line 922 of file platform.h.


#define S_ISLNK (   m)    (((m) & S_IFMT) == S_IFLNK)

Definition at line 919 of file platform.h.


#define S_ISREG (   m)    (((m) & S_IFMT) == S_IFREG)

Definition at line 913 of file platform.h.


#define S_ISSOCK (   m)    (((m) & S_IFMT) == S_IFSOCK)

Definition at line 931 of file platform.h.


#define S_IWGRP   00020

Definition at line 944 of file platform.h.


#define S_IWOTH   00002

Definition at line 951 of file platform.h.


#define S_IWUSR   00200

Definition at line 937 of file platform.h.


#define S_IXGRP   00010

Definition at line 945 of file platform.h.


#define S_IXOTH   00001

Definition at line 952 of file platform.h.


#define S_IXUSR   00100

Definition at line 938 of file platform.h.


#define SEEK_CUR   1

Definition at line 880 of file platform.h.


#define SF_APPEND   0

Definition at line 991 of file platform.h.


#define SF_ARCHIVED   0

Definition at line 985 of file platform.h.


#define SF_IMMUTABLE   0

Definition at line 988 of file platform.h.


#define SF_NOUNLINK   0

Definition at line 994 of file platform.h.

◆ sockaddr_storage

#define sockaddr_storage   sockaddr

Definition at line 689 of file platform.h.


#define ST_BLKSIZE (   statbuf)    DEV_BSIZE

Extract or fake data from a ‘struct stat’. ST_BLKSIZE: Optimal I/O blocksize for the file, in bytes. This is tightly coupled to ST_NBLOCKS, i.e it must stand that (s.st_size <= ST_NBLOCKS(s) * ST_BLKSIZE(s)) ST_NBLOCKS: Number of blocks in the file, in ST_BLKSIZE units WARNING this is different than "stat.st_nblocks" on most systems ST_NBYTES : "disk usage" of the file on the disk, in bytes.

TODO on Windows here is how to get the "cluster size" i.e. the block size:

  • send IOCTL_DISK_GET_DRIVE_GEOMETRY_EX and use Geometry.BytesPerSector from DISK_GEOMETRY_EX structure
  • To check if a file is sparse: File.GetAttributes().SparseFile

Definition at line 854 of file platform.h.


#define ST_NBLOCKS (   statbuf)    (((statbuf).st_size + DEV_BSIZE - 1) / DEV_BSIZE)

Definition at line 855 of file platform.h.


#define ST_NBYTES (   statbuf)    (ST_NBLOCKS(statbuf) * DEV_BSIZE)

Definition at line 856 of file platform.h.


#define UF_APPEND   0

Definition at line 976 of file platform.h.


#define UF_IMMUTABLE   0

Definition at line 973 of file platform.h.


#define UF_NODUMP   0

Definition at line 970 of file platform.h.


#define UF_NOUNLINK   0

Definition at line 982 of file platform.h.


#define UF_OPAQUE   0

Definition at line 979 of file platform.h.


#define WEXITSTATUS (   s)    ((unsigned)(s) >> 8)

Definition at line 141 of file platform.h.


#define WIFEXITED (   s)    (((s) & 255) == 0)

Definition at line 144 of file platform.h.


#define WIFSIGNALED (   s)    ((s) & 0) /* Can't use for BSD */

Definition at line 147 of file platform.h.


#define WTERMSIG (   s)    ((s) & 0)

Definition at line 150 of file platform.h.

Typedef Documentation

◆ clockid_t

typedef int clockid_t

Definition at line 415 of file platform.h.

◆ socklen_t

typedef int socklen_t

Definition at line 419 of file platform.h.

Function Documentation

◆ alarm()

unsigned int alarm ( unsigned int  seconds)

◆ ByteSwap32()

static uint32_t ByteSwap32 ( uint32_t  le32uint)

Definition at line 439 of file platform.h.

◆ chmod()

◆ chown()

int chown ( const char *  path,
uid_t  owner,
gid_t  group 

◆ clock_gettime()

int clock_gettime ( clockid_t  clock_id,
struct timespec *  tp 

◆ closefrom()

int closefrom ( int  fd)

Definition at line 37 of file closefrom.c.

References dirent, dirfd(), errno, and xsnprintf().

◆ dirfd()

int dirfd ( DIR *  dirp)

◆ drand48()

double drand48 ( void  )

Definition at line 36 of file drand48.c.

Referenced by DistributeClass(), FnCallRandomInt(), and RejectAnomaly().

◆ endnetgrent()

void endnetgrent ( void  )

Definition at line 78 of file patches.c.

Referenced by FnCallHostInNetgroup(), and Str2Uid().

◆ fchmod()

int fchmod ( int  fd,
mode_t  mode 

Referenced by RotateFiles(), and safe_chmod().

◆ fchmodat()

int fchmodat ( int  dirfd,
const char *  pathname,
mode_t  mode,
int  flags 

Definition at line 60 of file fchmodat.c.

References cleanup(), dirfd(), fchmodat_inner(), generic_at_function(), and fchmodat_data::pathname.

Referenced by safe_chmod().

◆ fchownat()

int fchownat ( int  dirfd,
const char *  pathname,
uid_t  owner,
gid_t  group,
int  flags 

◆ fgetgrent()

struct group* fgetgrent ( FILE *  stream)

Referenced by GetGrEntry(), and GetGroupInfo().

◆ freeaddrinfo()

void freeaddrinfo ( struct addrinfo *  res)

◆ fstatat()

int fstatat ( int  dirfd,
const char *  pathname,
struct stat *  buf,
int  flags 

◆ fsync()

int fsync ( int  fd)

◆ gai_strerror()

◆ getaddrinfo()

int getaddrinfo ( const char *  node,
const char *  service,
const struct addrinfo *  hints,
struct addrinfo **  res 

◆ getgid()

gid_t getgid ( void  )

◆ getline()

ssize_t getline ( char **  lineptr,
size_t *  n,
FILE *  stream 

◆ getloadavg()

int getloadavg ( double  loadavg[],
int  nelem 

◆ getnameinfo()

int getnameinfo ( const struct sockaddr *  sa,
socklen_t  salen,
char *  node,
socklen_t  nodelen,
char *  service,
socklen_t  servicelen,
int  flags 

◆ getnetgrent()

int getnetgrent ( char **  host,
char **  user,
char **  domain 

Definition at line 60 of file patches.c.

References NULL.

Referenced by FnCallHostInNetgroup(), and Str2Uid().

◆ getuid()

◆ glob()

int glob ( const char *  pattern,
int  flags,
int(*)(const char *epath, int eerrno)  errfunc,
glob_t pglob 

Referenced by GlobFileList().

◆ globfree()

void globfree ( glob_t pglob)

Referenced by GlobFileList().

◆ gmtime_r()

struct tm* gmtime_r ( const time_t *  timep,
struct tm *  result 

◆ inet_ntop()

const char* inet_ntop ( int  af,
const void *  src,
char *  dst,
socklen_t  size 

Definition at line 50 of file inet_ntop.c.

References AF_INET6, errno, inet_ntop4(), inet_ntop6(), and NULL.

Referenced by GetHostRSAKey(), ParseIPv4SocketInfo(), and ParseIPv6SocketInfo().

◆ inet_pton()

int inet_pton ( int  af,
const char *  src,
void *  dst 

Definition at line 51 of file inet_pton.c.

References AF_INET6, errno, and inet_pton4().

Referenced by FuzzySetMatch(), and getaddrinfo().

◆ localtime_r()

struct tm* localtime_r ( const time_t *  timep,
struct tm *  result 

◆ log2()

double log2 ( double  x)

Definition at line 27 of file log2.c.

◆ lstat()

int lstat ( const char *  file_name,
struct stat *  buf 

WARNING realpath() has varying behaviour among platforms.

  • Do not use it to convert relative paths to absolute (Solaris under certain conditions will return relative path).
  • Do not use it to check existence of file (on *BSD the last component of the path may not exist). Use it only to resolve all symlinks and canonicalise filename, i.e. remove double '/' and "/./" and "/../".

@TODO what we need is a resolvepath(2) cross-platform implementation.

Referenced by AccessControl(), cf_lstat(), CfCopyFile(), ConsiderLocalFile(), CopyRegularFile(), DeleteDirectoryTreeInternal(), DepthSearch(), ExpandLinks(), FnCallFileStat(), FnCallFileStatDetails(), FnCallMakerule(), fstatat_inner(), IsDirReal(), IsNewerFileTree(), MakeParentDirectory(), MoveObstruction(), PreprocessRequestPath(), PurgeLocalFiles(), SaveAsFile(), ScheduleLinkChildrenOperation(), SelectIsSymLinkTo(), SourceSearchAndCopy(), StatFile(), SummarizeTransaction(), TraverseDirectoryTreeInternal(), VerifyFilePromise(), VerifyFileSystem(), and VerifyName().

◆ memdup()

void* memdup ( const void *  mem,
size_t  size 

Definition at line 36 of file memdup.c.

References malloc, and NULL.

Referenced by xmemdup().

◆ memmem()

void* memmem ( const void *  haystack,
size_t  haystacklen,
const void *  needle,
size_t  needlelen 

Definition at line 31 of file memmem.c.

References NULL.

Referenced by ServerIdentificationDialog().

◆ memrchr()

void* memrchr ( const void *  s,
int  c,
size_t  n 

Definition at line 32 of file memrchr.c.

References NULL.

Referenced by GetProcessStat(), and StrList_SearchLongestPrefix().

◆ mkdtemp()

char* mkdtemp ( char *  template)

Definition at line 30 of file mkdtemp.c.

References errno, MAXTRY, NULL, S_IRUSR, S_IWUSR, S_IXUSR, and strrstr().

◆ nanosleep()

int nanosleep ( const struct timespec *  req,
struct timespec *  rem 

◆ openat()

int openat ( int  dirfd,
const char *  pathname,
int  flags,

◆ pthread_attr_setstacksize()

int pthread_attr_setstacksize ( pthread_attr_t *  attr,
size_t  stacksize 

Definition at line 35 of file pthread_attr_setstacksize.c.

Referenced by SpawnConnection(), and StartServer().

◆ readlinkat()

int readlinkat ( int  dirfd,
const char *  pathname,
char *  buf,
size_t  bufsiz 

◆ round()

double round ( double  x)

Definition at line 35 of file round.c.

◆ rpl_ctime()

char* rpl_ctime ( const time_t *  t)

Definition at line 30 of file rpl_ctime.c.

References cf_strtimestamp_local().

◆ rpl_mkdir()

int rpl_mkdir ( const char *  pathname,
mode_t  mode 

◆ rpl_rename()

int rpl_rename ( const char *  oldpath,
const char *  newpath 

◆ rpl_stat()

int rpl_stat ( const char *  path,
struct stat *  buf 

◆ setegid()

int setegid ( gid_t  gid)

Definition at line 91 of file patches.c.

References Log(), and LOG_LEVEL_VERBOSE.

◆ seteuid()

int seteuid ( uid_t  euid)

Definition at line 28 of file seteuid.c.

Referenced by safe_chmod().

◆ setlinebuf()

void setlinebuf ( FILE *  stream)

Definition at line 47 of file setlinebuf.c.

References IO_MODE, and NULL.

Referenced by GenericAgentInitialize().

◆ setnetgrent()

void setnetgrent ( const char *  netgroup)

Definition at line 47 of file patches.c.

Referenced by FnCallHostInNetgroup(), and Str2Uid().

◆ sleep()

◆ socketpair()

int socketpair ( int  domain,
int  type,
int  protocol,
int  sv[2] 

Referenced by MakeSignalPipe().

◆ srand48()

void srand48 ( long  seed)

Definition at line 35 of file srand48.c.

Referenced by RandomSeed(), and RejectAnomaly().

◆ stpncpy()

char* stpncpy ( char *  dst,
const char *  src,
size_t  len 

Definition at line 39 of file stpncpy.c.

References NULL.

◆ strcasecmp()

int strcasecmp ( const char *  s1,
const char *  s2 

◆ strcasestr()

char* strcasestr ( const char *  haystack,
const char *  needle 

Definition at line 36 of file strcasestr.c.

References NULL, and strncasecmp().

Referenced by FindV6InterfacesInfo().

◆ strchrnul()

char* strchrnul ( const char *  s,
int  c 

Definition at line 9 of file strchrnul.c.

References NULL.

Referenced by AuthorizeDelimitedArgs(), CommandArg0_bound(), IsMangled(), and LogEnableModulesFromString().

◆ strdup()

char* strdup ( const char *  str)

Definition at line 36 of file strdup.c.

References malloc, and NULL.

Referenced by ExpandThisPromiserScalar(), and xstrdup().

◆ strerror()

char* strerror ( int  err)

◆ strlcat()

◆ strlcpy()

size_t strlcpy ( char *  destination,
const char *  source,
size_t  size 

Definition at line 34 of file strlcpy.c.

Referenced by AccessControl(), AcquireLock(), Address2HostkeyInDB(), CalculateDomainName(), CanonifyChar(), CanonifyName(), CfOpenDirectory(), CfSecOpenDirectory(), CheckOpts(), CommandArg0(), CommandArg0_bound(), CopyFileSources(), CopyRegularFile(), CreateHardClassesFromCanonification(), DeleteDigestFromLastSeen(), DeleteIpFromLastSeen(), DepthSearch(), DetectDomainName(), DoCreateUser(), EditColumns(), EvalContextClassPut(), EvalContextHeapPersistentSave(), EvalContextStackFrameAddSoft(), EvalContextStackPushPromiseFrame(), ExecuteSchedule(), ExpandListEntry(), ExtractFirstReference(), FindLargestVersionAvail(), FnCallBasename(), FnCallDirname(), FnCallFileStatDetails(), FnCallFindfiles(), FnCallFormat(), FnCallPeerLeader(), FnCallTranslatePath(), FuzzyHostMatch(), GenericAgentResolveInputPath(), GetAutotagDir(), GetCachedPackageList(), GetCurrentUserName(), GetInterfacesInfo(), GetLockName(), GetNaked(), GetNameInfo3(), GetRepositoryPath(), HandleConnection(), IsForeignFileSystem(), IsNewerThanInstalled(), KeepControlPromises(), LoadMountInfo(), LocalExec(), LocateFilePromiserGroup(), LoggingFormatTimestamp(), LoggingSetAgentType(), MakeParentDirectory(), MatchPolicy(), ModuleProtocol(), MoveObstruction(), NewIndexKey(), OSClasses(), ParserParseFile(), PrefixLocalRepository(), PrependListPackageItem(), PrependMultiLinePackageItem(), PrependPatchItem(), PreprocessRequestPath(), PromiseBanner(), PushLock(), RegExMatchSubString(), ReplacePatterns(), resolve_callback(), ResolveControlBody(), RvalNewRewriter(), ScheduleLinkChildrenOperation(), SchedulePackageOp(), ServerConnection(), SetBindInterface(), SetConnectionData(), ShowHost(), SourceSearchAndCopy(), SpawnConnection(), TranslatePath(), ValidateRegistryPromiser(), ValidateSQLTableName(), VerifyDatabasePromise(), VerifyHardLink(), VerifyInFstab(), VerifyLink(), VerifyName(), VerifyPromisedPackage(), VerifyPromisedPatch(), VerifySQLPromise(), and VerifyTablePromise().

◆ strncasecmp()

int strncasecmp ( const char *  s1,
const char *  s2,
size_t  n 

Definition at line 33 of file strncasecmp.c.

◆ strndup()

char* strndup ( const char *  s,
size_t  n 

Definition at line 38 of file strndup.c.

References malloc, NULL, and strnlen().

Referenced by xstrndup().

◆ strnlen()

size_t strnlen ( const char *  str,
size_t  maxlen 

Definition at line 32 of file strnlen.c.

◆ strrstr()

char* strrstr ( const char *  haystack,
const char *  needle 

Definition at line 43 of file strrstr.c.

References NULL.

Referenced by mkdtemp().

◆ strsep()

char* strsep ( char **  stringp,
const char *  delim 

Definition at line 53 of file strsep.c.

References NULL.

◆ strsignal()

char* strsignal ( int  sig)

Definition at line 43 of file strsignal.c.

References SIGNAL_TEXT.

◆ strstr()

◆ uname()

int uname ( struct utsname buf)

◆ unsetenv()

int unsetenv ( const char *  name)