11 static bool chmodr(
const char *,
int recursive);
12 static bool parsemode(
const char *);
13 static void recurse(
const char *
path,
int rec,
bool (*
fn)(
const char *,
int));
15 static char oper =
'=';
23 if (!parsemode(
mod)) {
26 return chmodr(
file, recursive);
34 static bool chmodr(
const char *
path,
int rflag) {
62 static bool parsemode(
const char *
str) {
68 octal = strtol(
str, &
end, 8);
118 mask |= S_IRWXU | S_IRWXG | S_IRWXO;
128 mode |= S_IRUSR | S_IRGRP | S_IROTH;
131 mode |= S_IWUSR | S_IWGRP | S_IWOTH;
134 mode |= S_IXUSR | S_IXGRP | S_IXOTH;
137 mode |= S_ISUID | S_ISGID;
151 static char *agetcwd(
void) {
156 if (!getcwd(
buf, 4096)) {
162 static void recurse(
const char *
path,
int rec,
bool (*
fn)(
const char *,
int)) {
168 if (lstat(
path, &st) == -1 || !
S_ISDIR(st.st_mode)) {
170 }
else if (!(dp = opendir(
path))) {
182 if (strcmp(
d->d_name,
".") && strcmp(
d->d_name,
"..")) {
static RzList * recurse(RzCore *core, RzAnalysisBlock *from, RzAnalysisBlock *dest)
RZ_API bool rz_file_chmod(const char *file, const char *mod, int recursive)
static static fork const void static count static fd const char const char static newpath const char static path const char path
static static fork const void static count static fd const char const char static newpath chdir
static static fork const void static count static fd const char const char static newpath const char static path chmod
RZ_API void Ht_() free(HtName_(Ht) *ht)
void * malloc(size_t size)
static const char struct stat static buf struct stat static buf static idle const char static path static fd const char static len const void static prot const char struct module static image struct kernel_sym static table unsigned char static buf static fsuid unsigned struct dirent unsigned static count const struct iovec static count static pid const void static len static flags const struct sched_param static p static pid static policy struct timespec static tp static suid unsigned fn
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync const char const char static newpath const char static pathname unsigned long static filedes void static end_data_segment static handler static getegid char static len static pgid const char static path static newfd static getpgrp static euid const sigset_t static mask const char static len const gid_t static list const char const char static newpath const char static library readdir