2007-10-07 17:14:02 +05:30
|
|
|
/*
|
|
|
|
* prototypes.h
|
|
|
|
*
|
|
|
|
* Missing function prototypes
|
|
|
|
*
|
|
|
|
* Juha Virtanen, <jiivee@hut.fi>; November 1995
|
|
|
|
*/
|
|
|
|
/*
|
2007-11-11 05:16:11 +05:30
|
|
|
* $Id$
|
2007-10-07 17:14:02 +05:30
|
|
|
*
|
|
|
|
* Added a macro to work around ancient (non-ANSI) compilers, just in case
|
|
|
|
* someone ever tries to compile this with SunOS cc... --marekm
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _PROTOTYPES_H
|
|
|
|
#define _PROTOTYPES_H
|
|
|
|
|
|
|
|
#include <sys/stat.h>
|
2007-10-07 17:15:23 +05:30
|
|
|
#if HAVE_UTMPX_H
|
|
|
|
#include <utmpx.h>
|
|
|
|
#else
|
2007-10-07 17:14:02 +05:30
|
|
|
#include <utmp.h>
|
2007-10-07 17:15:23 +05:30
|
|
|
#endif
|
2007-10-07 17:14:02 +05:30
|
|
|
#include <pwd.h>
|
|
|
|
#include <grp.h>
|
|
|
|
|
|
|
|
#include "defines.h"
|
|
|
|
|
|
|
|
/* addgrps.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int add_groups (const char *);
|
|
|
|
extern void add_cons_grps (void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* age.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void agecheck (const struct passwd *, const struct spwd *);
|
|
|
|
extern int expire (const struct passwd *, const struct spwd *);
|
|
|
|
extern int isexpired (const struct passwd *, const struct spwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* basename() renamed to Basename() to avoid libc name space confusion */
|
|
|
|
/* basename.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern char *Basename (char *str);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* chowndir.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int chown_tree (const char *, uid_t, uid_t, gid_t, gid_t);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* chowntty.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void chown_tty (const char *, const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* console.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int console (const char *);
|
|
|
|
extern int is_listed (const char *, const char *, int);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* copydir.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int copy_tree (const char *, const char *, uid_t, gid_t);
|
|
|
|
extern int remove_tree (const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* encrypt.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern char *pw_encrypt (const char *, const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* entry.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void pw_entry (const char *, struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* env.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void addenv (const char *, const char *);
|
|
|
|
extern void initenv (void);
|
|
|
|
extern void set_env (int, char *const *);
|
|
|
|
extern void sanitize_env (void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* fields.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void change_field (char *, size_t, const char *);
|
|
|
|
extern int valid_field (const char *, const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* fputsx.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern char *fgetsx (char *, int, FILE *);
|
|
|
|
extern int fputsx (const char *, FILE *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* grent.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int putgrent (const struct group *, FILE *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* hushed.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int hushed (const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
2007-10-07 17:17:01 +05:30
|
|
|
/* audit_help.c */
|
|
|
|
#ifdef WITH_AUDIT
|
|
|
|
extern int audit_fd;
|
2007-10-07 17:17:22 +05:30
|
|
|
extern void audit_help_open (void);
|
|
|
|
extern void audit_logger (int type, const char *pgname, const char *op,
|
|
|
|
const char *name, unsigned int id, int result);
|
2007-10-07 17:17:01 +05:30
|
|
|
#endif
|
|
|
|
|
2007-10-07 17:14:02 +05:30
|
|
|
/* limits.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void setup_limits (const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* list.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern char **add_list (char **, const char *);
|
|
|
|
extern char **del_list (char **, const char *);
|
|
|
|
extern char **dup_list (char *const *);
|
|
|
|
extern int is_on_list (char *const *, const char *);
|
|
|
|
extern char **comma_to_list (const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* login.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void login_prompt (const char *, char *, int);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* mail.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void mailcheck (void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* motd.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void motd (void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* myname.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern struct passwd *get_my_pwent (void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* obscure.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int obscure (const char *, const char *, const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* pam_pass.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int do_pam_passwd (const char *, int, int);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* port.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int isttytime (const char *, const char *, time_t);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* pwd2spwd.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern struct spwd *pwd_to_spwd (const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* pwdcheck.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void passwd_check (const char *, const char *, const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* pwd_init.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void pwd_init (void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* rlogin.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int do_rlogin (const char *, char *, int, char *, int);
|
2007-10-07 17:14:14 +05:30
|
|
|
|
|
|
|
/* salt.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern char *crypt_make_salt (void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* setugid.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int setup_groups (const struct passwd *);
|
|
|
|
extern int change_uid (const struct passwd *);
|
|
|
|
extern int setup_uid_gid (const struct passwd *, int);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* setup.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void setup (struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* setupenv.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void setup_env (struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* shell.c */
|
2007-10-07 17:17:22 +05:30
|
|
|
extern int shell (const char *, const char *, char *const *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* strtoday.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern long strtoday (const char *);
|
2007-10-07 17:14:14 +05:30
|
|
|
|
|
|
|
/* suauth.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int check_su_auth (const char *, const char *);
|
2007-10-07 17:14:14 +05:30
|
|
|
|
|
|
|
/* sulog.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void sulog (const char *, int, const char *, const char *);
|
2007-10-07 17:14:14 +05:30
|
|
|
|
|
|
|
/* sub.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void subsystem (const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* ttytype.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void ttytype (const char *);
|
2007-10-07 17:14:14 +05:30
|
|
|
|
|
|
|
/* tz.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern char *tz (const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* ulimit.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void set_filesize_limit (int);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* utmp.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern void checkutmp (int);
|
|
|
|
extern void setutmp (const char *, const char *, const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* valid.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern int valid (const char *, const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* xmalloc.c */
|
2007-10-07 17:16:07 +05:30
|
|
|
extern char *xmalloc (size_t);
|
|
|
|
extern char *xstrdup (const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
2007-10-07 17:16:07 +05:30
|
|
|
#endif /* _PROTOTYPES_H */
|