MCPcopy Index your code
hub / github.com/RsyncProject/rsync / poptSaneFile

Function poptSaneFile

popt/poptconfig.c:111–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110
111int poptSaneFile(const char * fn)
112{
113 struct stat sb;
114
115 if (fn == NULL || strstr(fn, ".rpmnew") || strstr(fn, ".rpmsave"))
116 return 0;
117 if (stat(fn, &sb) == -1)
118 return 0;
119 if (!S_ISREG(sb.st_mode))
120 return 0;
121 if (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))
122 return 0;
123 return 1;
124}
125
126int poptReadFile(const char * fn, char ** bp, size_t * nbp, int flags)
127{

Callers 2

poptReadConfigFilesFunction · 0.85
poptReadDefaultConfigFunction · 0.85

Calls 1

statClass · 0.70

Tested by

no test coverage detected