2007-10-07 17:14:02 +05:30
|
|
|
/*
|
|
|
|
* prototypes.h
|
|
|
|
*
|
|
|
|
* Missing function prototypes
|
|
|
|
*
|
|
|
|
* Juha Virtanen, <jiivee@hut.fi>; November 1995
|
|
|
|
*/
|
|
|
|
/*
|
2007-10-07 17:14:14 +05:30
|
|
|
* $Id: prototypes.h,v 1.14 2000/08/26 18:27:17 marekm Exp $
|
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>
|
|
|
|
#include <utmp.h>
|
|
|
|
#include <pwd.h>
|
|
|
|
#include <grp.h>
|
|
|
|
|
|
|
|
#include "defines.h"
|
|
|
|
|
|
|
|
/* addgrps.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int add_groups(const char *);
|
|
|
|
extern void add_cons_grps(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* age.c */
|
|
|
|
#ifdef SHADOWPWD
|
2007-10-07 17:14:14 +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
|
|
|
#else
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void agecheck(const struct passwd *);
|
|
|
|
extern int expire(const struct passwd *);
|
|
|
|
extern int isexpired(const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
#endif
|
|
|
|
|
|
|
|
/* basename() renamed to Basename() to avoid libc name space confusion */
|
|
|
|
/* basename.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern char *Basename(char *str);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* chkshell.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int check_shell(const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* chowndir.c */
|
2007-10-07 17:14:14 +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:14:14 +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:14:14 +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:14:14 +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:14:14 +05:30
|
|
|
extern char *pw_encrypt(const char *, const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* entry.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void pw_entry(const char *, struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* env.c */
|
2007-10-07 17:14:14 +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:14:14 +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:14:14 +05:30
|
|
|
extern char *fgetsx(char *, int, FILE *);
|
|
|
|
extern int fputsx(const char *, FILE *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* grdbm.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int gr_dbm_remove(const struct group *);
|
|
|
|
extern int gr_dbm_update(const struct group *);
|
|
|
|
extern int gr_dbm_present(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* grent.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int putgrent(const struct group *, FILE *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* grpack.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int gr_pack(const struct group *, char *);
|
|
|
|
extern int gr_unpack(char *, int, struct group *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
#ifdef SHADOWGRP
|
|
|
|
/* gsdbm.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int sg_dbm_remove(const char *);
|
|
|
|
extern int sg_dbm_update(const struct sgrp *);
|
|
|
|
extern int sg_dbm_present(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* gspack.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int sgr_pack(const struct sgrp *, char *);
|
|
|
|
extern int sgr_unpack(char *, int, struct sgrp *);
|
2007-10-07 17:14:02 +05:30
|
|
|
#endif
|
|
|
|
|
|
|
|
/* hushed.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int hushed(const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* limits.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void setup_limits(const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* list.c */
|
2007-10-07 17:14:14 +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:14:14 +05:30
|
|
|
extern void login_prompt(const char *, char *, int);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* login_desrpc.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int login_desrpc(const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* mail.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void mailcheck(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* motd.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void motd(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* myname.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern struct passwd *get_my_pwent(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* obscure.c */
|
2007-10-07 17:14:14 +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:14:14 +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:14:14 +05:30
|
|
|
extern int isttytime(const char *, const char *, time_t);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* pwd2spwd.c */
|
|
|
|
#ifdef SHADOWPWD
|
2007-10-07 17:14:14 +05:30
|
|
|
extern struct spwd *pwd_to_spwd(const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
#endif
|
|
|
|
|
|
|
|
/* pwdcheck.c */
|
2007-10-07 17:14:14 +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:14:14 +05:30
|
|
|
extern void pwd_init(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* pwdbm.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int pw_dbm_remove(const struct passwd *);
|
|
|
|
extern int pw_dbm_update(const struct passwd *);
|
|
|
|
extern int pw_dbm_present(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* pwpack.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int pw_pack(const struct passwd *, char *);
|
|
|
|
extern int pw_unpack(char *, int, struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* rad64.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int c64i(int);
|
|
|
|
extern int i64c(int);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* rlogin.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int do_rlogin(const char *, char *, int, char *, int);
|
|
|
|
|
|
|
|
/* salt.c */
|
|
|
|
extern char *crypt_make_salt(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* setugid.c */
|
2007-10-07 17:14:14 +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:14:14 +05:30
|
|
|
extern void setup(struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* setupenv.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void setup_env(struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* shell.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void shell(const char *, const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
#ifdef SHADOWPWD
|
|
|
|
/* spdbm.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int sp_dbm_remove(const char *);
|
|
|
|
extern int sp_dbm_update(const struct spwd *);
|
|
|
|
extern int sp_dbm_present(void);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* sppack.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern int spw_pack(const struct spwd *, char *);
|
|
|
|
extern int spw_unpack(char *, int, struct spwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
#endif
|
|
|
|
|
|
|
|
/* strtoday.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern long strtoday(const char *);
|
|
|
|
|
|
|
|
/* suauth.c */
|
|
|
|
extern int check_su_auth(const char *, const char *);
|
|
|
|
|
|
|
|
/* sulog.c */
|
|
|
|
extern void sulog(const char *, int, const char *, const char *);
|
|
|
|
|
|
|
|
/* sub.c */
|
|
|
|
extern void subsystem(const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* ttytype.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void ttytype(const char *);
|
|
|
|
|
|
|
|
/* tz.c */
|
|
|
|
extern char *tz(const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* ulimit.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern void set_filesize_limit(int);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* utmp.c */
|
2007-10-07 17:14:14 +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:14:14 +05:30
|
|
|
extern int valid(const char *, const struct passwd *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
/* xmalloc.c */
|
2007-10-07 17:14:14 +05:30
|
|
|
extern char *xmalloc(size_t);
|
|
|
|
extern char *xstrdup(const char *);
|
2007-10-07 17:14:02 +05:30
|
|
|
|
|
|
|
#endif /* _PROTOTYPES_H */
|