chmod.c File Reference

#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <minix/minlib.h>
#include <stdio.h>

Include dependency graph for chmod.c:

Go to the source code of this file.

Defines

#define S_ISLNK(mode)   0
#define lstat   stat
#define USR_MODES   (S_ISUID|S_IRWXU)
#define GRP_MODES   (S_ISGID|S_IRWXG)
#define EXE_MODES   (S_IXUSR|S_IXGRP|S_IXOTH)
#define ALL_MODES   (USR_MODES|GRP_MODES|S_IRWXO)

Functions

 _PROTOTYPE (int main,(int argc, char **argv))
 _PROTOTYPE (mode_t parsemode,(char *symbolic, mode_t oldmode))
 _PROTOTYPE (int do_change,(char *name))
 _PROTOTYPE (void usage,(void))
mode_t parsemode (char *symbolic, mode_t oldmode)
int main (int argc, argv)
int do_change (char *name)
void usage ()

Variables

char * symbolic
mode_t new_mode
mode_t u_mask
int rflag
int errors
stat st
char path [PATH_MAX+1]


Define Documentation

#define ALL_MODES   (USR_MODES|GRP_MODES|S_IRWXO)
 

Definition at line 31 of file chmod.c.

Referenced by clone_opcl(), common_open(), do_chmod(), do_mknod(), dump_file(), main(), parsemode(), restore(), and show_info().

#define EXE_MODES   (S_IXUSR|S_IXGRP|S_IXOTH)
 

Definition at line 27 of file chmod.c.

#define GRP_MODES   (S_ISGID|S_IRWXG)
 

Definition at line 26 of file chmod.c.

#define lstat   stat
 

Definition at line 22 of file chmod.c.

#define S_ISLNK mode   )     0
 

Definition at line 21 of file chmod.c.

#define USR_MODES   (S_ISUID|S_IRWXU)
 

Definition at line 25 of file chmod.c.

Referenced by parsemode().


Function Documentation

_PROTOTYPE void  usage,
(void) 
 

_PROTOTYPE int  do_change,
(char *name
 

_PROTOTYPE mode_t  parsemode,
(char *symbolic, mode_t oldmode
 

_PROTOTYPE int  main,
(int argc, char **argv) 
 

int do_change char *  name  ) 
 

Definition at line 204 of file chmod.c.

References chmod, closedir, dirent::d_name, errors, lstat, m, new_mode, opendir, parsemode(), path, perror(), readdir, rflag, S_ISDIR, S_ISLNK, st, stat::st_mode, strcpy(), and strlen().

Referenced by main().

int main int  argc,
argv 
 

Definition at line 163 of file chmod.c.

References ALL_MODES, do_change(), ex_code, new_mode, rflag, strcmp, u_mask, umask, and usage.

mode_t parsemode char *  symbolic,
mode_t  oldmode
 

Definition at line 48 of file chmod.c.

References ALL_MODES, USR_MODES, and who.

Referenced by do_change(), and makedir().

void usage void   ) 
 

Definition at line 250 of file chmod.c.

References exit(), and std_err().


Variable Documentation

int errors
 

Definition at line 38 of file chmod.c.

Referenced by _catch(), atapi_transfer(), catch(), do_change(), f_transfer(), main(), output(), sendzsinit(), w_transfer(), zperr(), and zsendcmd().

mode_t new_mode
 

Definition at line 37 of file chmod.c.

Referenced by do_change(), and main().

char path[PATH_MAX+1]
 

Definition at line 40 of file chmod.c.

int rflag
 

Definition at line 38 of file chmod.c.

struct stat st
 

Definition at line 39 of file chmod.c.

Referenced by add(), add_file(), add_open(), announce(), apply_add(), apply_chmod(), apply_remove(), cgiexec(), check_mknod(), cleandir(), cnvtfile(), compare(), config_read(), crash_check(), delete(), descend(), dev_status(), different(), display_attrib(), do_change(), do_chown(), do_fstatfs(), do_login(), dofdet(), doMDTM(), doSIZE(), explode(), extract_image(), fast(), fdopen(), file_size(), file_write(), filetime(), find(), finddev(), fopen(), format_device(), freopen(), fsize(), get_block_size(), install_master(), islink(), job(), kbc_read(), keep_reading(), listfiles(), ls(), main(), make_bootable(), make_image(), makedir(), makepath(), maketree(), mode(), my_getcwd(), name2dev(), newdevice(), opendir(), ownername(), police(), r_lookup(), read_conf(), read_file(), readch(), readmtab(), recover(), run_job(), searchtab(), select_image(), setfiletime(), setmodes(), showpage(), sizeup(), slave(), tab_parse(), test25c(), test26a(), test27b(), test27c(), test28a(), test28b(), test30a(), test31a(), test32b(), test34c(), test35a(), test38b(), test38c(), test40b(), traverse(), uniqname(), waitforjob(), and writedata().

char* symbolic
 

Definition at line 36 of file chmod.c.

Referenced by backtrace(), c_status(), command(), and display().

mode_t u_mask
 

Definition at line 37 of file chmod.c.

Referenced by do_chown(), main(), and makepath().


Generated on Fri Apr 14 23:06:16 2006 for minix by  doxygen 1.4.6