This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/unix/mbpasswd.h

45 lines
1.2 KiB
C
Raw Normal View History

2001-08-17 05:46:24 +00:00
#ifndef _MBUSERADD_H
#define _MBUSERADD_H
/* danger - side effects */
#define STRFCPY(A,B) \
(strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
2001-08-25 19:53:11 +00:00
/*
* exit status values
*/
#define E_SUCCESS 0 /* success */
#define E_NOPERM 1 /* permission denied */
#define E_USAGE 2 /* invalid combination of options */
#define E_FAILURE 3 /* unexpected failure, nothing done */
#define E_MISSING 4 /* unexpected failure, passwd file missing */
#define E_PWDBUSY 5 /* passwd file busy, try again later */
#define E_BAD_ARG 6 /* invalid argument to option */
2001-08-17 05:46:24 +00:00
/*
* Function prototypes
*/
struct passwd *get_my_pwent(void);
static int new_password (const struct passwd *, char *);
void pwd_init(void);
char *crypt_make_salt(void);
char *pw_encrypt(const char *, const char *);
int i64c(int);
char *l64a(long);
2002-01-11 19:01:00 +00:00
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
2001-08-25 19:53:11 +00:00
static void fail_exit(int);
static void oom(void);
2001-08-17 05:46:24 +00:00
static void update_noshadow(int);
2001-08-25 19:53:11 +00:00
#endif
2001-08-17 05:46:24 +00:00
#ifdef SHADOW_PASSWORD
struct spwd *pwd_to_spwd(const struct passwd *);
static void update_shadow(void);
#endif
#endif