A
download chown-core.h
Language: C
License: GPL
Copyright: (C) 2000, 2003, 2004 Free Software Foundation.
LOC: 40
Project Info
GNU Core Utilities(coreutils)
Server: Savannah GNU
Type: cvs
...ls\coreutils\coreutils\src\
   .gitignore
   base64.c
   basename.c
   c99-to-c89.diff
   cat.c
   chcon.c
   chgrp.c
   chmod.c
   chown-core.c
   chown-core.h
   chown.c
   chroot.c
   cksum.c
   comm.c
   copy.c
   copy.h
   cp-hash.c
   cp-hash.h
   cp.c
   csplit.c
   cut.c
   date.c
   dd.c
   df.c
   dircolors.c
   dircolors.hin
   dirname.c
   du.c
   echo.c
   env.c
   expand.c
   expr.c
   factor.c
   false.c
   fmt.c
   fold.c
   groups.sh
   head.c
   hostid.c
   hostname.c
   id.c
   install.c
   join.c
   kill.c
   lbracket.c
   link.c
   ln.c
   logname.c
   ls-dir.c
   ls-ls.c
   ls-vdir.c
   ls.c
   ls.h
   Makefile.am
   md5sum.c
   mkdir.c
   mkfifo.c
   mknod.c
   mv.c
   nice.c
   nl.c
   nohup.c
   od.c
   paste.c
   pathchk.c
   pinky.c
   pr.c
   printenv.c
   printf.c
   ptx.c
   pwd.c
   readlink.c
   remove.c
   remove.h
   rm.c
   rmdir.c
   runcon.c
   seq.c
   setuidgid.c
   shred.c
   shuf.c
   sleep.c
   sort.c
   split.c
   stat.c
   stty.c
   su.c
   sum.c
   sync.c
   system.h
   tac-pipe.c
   tac.c
   tail.c
   tee.c
   test.c
   touch.c
   tr.c
   true.c
   tsort.c
   tty.c
   uname-arch.c
   uname-uname.c
   uname.c
   uname.h
   unexpand.c
   uniq.c
   unlink.c
   uptime.c
   users.c
   wc.c
   wheel-gen.pl
   who.c
   whoami.c
   yes.c

/* chown-core.h -- types and prototypes shared by chown and chgrp.

   Copyright (C) 2000, 2003, 2004 Free Software Foundation.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

#ifndef CHOWN_CORE_H
# define CHOWN_CORE_H

# include "dev-ino.h"

enum Change_status
{
  CH_NOT_APPLIED = 1,
  CH_SUCCEEDED,
  CH_FAILED,
  CH_NO_CHANGE_REQUESTED
};

enum Verbosity
{
  /* Print a message for each file that is processed.  */
  V_high,

  /* Print a message for each file whose attributes we change.  */
  V_changes_only,

  /* Do not be verbose.  This is the default. */
  V_off
};

struct Chown_option
{
  /* Level of verbosity.  */
  enum Verbosity verbosity;

  /* If nonzero, change the ownership of directories recursively. */
  bool recurse;

  /* Pointer to the device and inode numbers of `/', when --recursive.
     Need not be freed.  Otherwise NULL.  */
  struct dev_ino *root_dev_ino;

  /* This corresponds to the --dereference (opposite of -h) option.  */
  bool affect_symlink_referent;

  /* If nonzero, force silence (no error messages). */
  bool force_silent;

  /* The name of the user to which ownership of the files is being given. */
  char *user_name;

  /* The name of the group to which ownership of the files is being given. */
  char *group_name;
};

void
chopt_init (struct Chown_option *);

void
chopt_free (struct Chown_option *);

char *
gid_to_name (gid_t);

char *
uid_to_name (uid_t);

bool
chown_files (char **files, int bit_flags,
	     uid_t uid, gid_t gid,
	     uid_t required_uid, gid_t required_gid,
	     struct Chown_option const *chopt);

#endif /* CHOWN_CORE_H */

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us