/*	priv.h	*/

#define const
#include <stdio.h>
#include <ssdef.h>
#include <uaidef.h>
#include <prvdef.h>
#include <starlet.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <pwd.h>
#include <grp.h>

struct itemdesc {
  short int buffer_length;
  short int item_code;
  char *buffer;
  short int *ret_length;
  };

struct id {
	unsigned long uic;
	unsigned long attr;
};

struct uai {
	struct uai *next;
	unsigned long uic;
	unsigned long priv[2];
	struct id *id_list;
	char dir[256];
	char password[9];
	char name[13];
};

#if 1	/* for use with samba's debugging */
extern int DEBUGLEVEL;
#define DEBUG(level,body) ((DEBUGLEVEL>=(level))?(Debug1 body):0)
int Debug1();
#else
int DEBUGLEVEL = 8;
#define DEBUG(level,body) ((DEBUGLEVEL>=(level))?(printf body):0)
#endif

EXTERN struct passwd password_struct;
EXTERN char login_name[64];
EXTERN char login_password[64];
EXTERN char login_comment[64];
EXTERN char login_gecos[64];
EXTERN char login_dir[64];
EXTERN char login_shell[64];
EXTERN long login_priv[2];
EXTERN struct uai *login_uai;

char *vms_getlogin();
struct uai *find_uai_by_name(char *__name);
struct uai *find_uai_by_uic(unsigned long __uic);
long setup_pw();
