rpasswd.c File Reference

#include <sys/types.h>
#include <time.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
#include <string.h>
#include "pwauth.h"
#include "pwio.h"
#include "getdef.h"
#include "t_pwd.h"

Go to the source code of this file.

Defines

#define P_(x)   ()
#define STRFCPY(A, B)   (strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
#define SROOTDCONF   ".srootdpass.conf"
#define SROOTDPASS   ".srootdpass"
#define USAGE   "usage: %s [ -c config ] [ -p passwd ] [ name ]\n"
#define NEWPASSMSG   "Enter the new password (minimum of %d, maximum of %d characters)\n\Please use a combination of upper and lower case letters and numbers.\n"
#define NEWPASS   "New password:"
#define NEWPASS2   "Re-enter new password:"
#define NOMATCH   "They don't match; try again.\n"
#define EPSFAIL   "Unable to update EPS password.\n"
#define NOEPSCONF   "Warning: configuration file missing; please run 'tconf'\n"
#define WHOAREYOU   "%s: Cannot determine your user name.\n"
#define UNKUSER   "%s: Unknown user %s\n"
#define UNCHANGED   "The password for %s is unchanged.\n"
#define PASSWARN   "\nWarning: weak password (enter it again to use it anyway).\n"

Functions

int obscure P_ ((const char *, const char *, const struct passwd *))
char *Basename P_ ((char *str))
passwd *get_my_pwent P_ ((void))
char *xstrdup P_ ((const char *str))
char * crypt_make_salt ()
char * l64a ()
static void usage (int status)
static int new_password (const struct passwd *pw)
int main (int argc, char **argv)

Variables

static int do_update_eps = 0
t_pw eps_passwd
static char * name
static char * myname
static char * Prog
static char r_tconf [256]
static char r_passwd [256]
int optind
char * optarg


Define Documentation

#define EPSFAIL   "Unable to update EPS password.\n"

Definition at line 78 of file rpasswd.c.

Referenced by main().

#define NEWPASS   "New password:"

Definition at line 74 of file rpasswd.c.

Referenced by new_password().

#define NEWPASS2   "Re-enter new password:"

Definition at line 75 of file rpasswd.c.

Referenced by new_password().

#define NEWPASSMSG   "Enter the new password (minimum of %d, maximum of %d characters)\n\Please use a combination of upper and lower case letters and numbers.\n"

Definition at line 71 of file rpasswd.c.

#define NOEPSCONF   "Warning: configuration file missing; please run 'tconf'\n"

Definition at line 79 of file rpasswd.c.

Referenced by new_password().

#define NOMATCH   "They don't match; try again.\n"

Definition at line 76 of file rpasswd.c.

Referenced by GIFencode(), and new_password().

#define P_ ( x   )     ()

Definition at line 19 of file rpasswd.c.

#define PASSWARN   "\nWarning: weak password (enter it again to use it anyway).\n"

Definition at line 85 of file rpasswd.c.

Referenced by new_password().

#define SROOTDCONF   ".srootdpass.conf"

Definition at line 63 of file rpasswd.c.

Referenced by main().

#define SROOTDPASS   ".srootdpass"

Definition at line 64 of file rpasswd.c.

Referenced by main().

#define STRFCPY ( A,
B   )     (strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')

Definition at line 22 of file rpasswd.c.

Referenced by main(), and new_password().

#define UNCHANGED   "The password for %s is unchanged.\n"

Definition at line 83 of file rpasswd.c.

Referenced by main().

#define UNKUSER   "%s: Unknown user %s\n"

Definition at line 82 of file rpasswd.c.

#define USAGE   "usage: %s [ -c config ] [ -p passwd ] [ name ]\n"

Definition at line 70 of file rpasswd.c.

Referenced by usage().

#define WHOAREYOU   "%s: Cannot determine your user name.\n"

Definition at line 81 of file rpasswd.c.

Referenced by main().


Function Documentation

char* crypt_make_salt (  ) 

char* l64a (  ) 

int main ( int  argc,
char **  argv 
)

Definition at line 203 of file rpasswd.c.

References creat(), EOF, EPSFAIL, fclose(), flag, fopen, fprintf(), getenv(), new_password(), NULL, passwd::pw_name, sprintf(), SROOTDCONF, SROOTDPASS, STRFCPY, UNCHANGED, usage, and WHOAREYOU.

static int new_password ( const struct passwd pw  )  [static]

Definition at line 103 of file rpasswd.c.

References fprintf(), i, NEWPASS, NEWPASS2, NOEPSCONF, NOMATCH, NULL, PASSWARN, and STRFCPY.

Referenced by main().

char* xstrdup P_ ( (const char *str  ) 

struct passwd* get_my_pwent P_ ( (void)   ) 

char* Basename P_ ( (char *str  ) 

int obscure P_ ( (const char *, const char *, const struct passwd *)   ) 

static void usage ( int  status  )  [static]

Definition at line 92 of file rpasswd.c.

References fprintf(), and USAGE.


Variable Documentation

int do_update_eps = 0 [static]

Definition at line 36 of file rpasswd.c.

struct t_pw eps_passwd

Definition at line 37 of file rpasswd.c.

char* myname [static]

Definition at line 44 of file rpasswd.c.

Referenced by XrdNetDNS::getHostName().

char* name [static]

Definition at line 43 of file rpasswd.c.

char* optarg

Referenced by XrdFrmConfig::Configure(), XrdConfig::Configure(), getargs(), and main().

int optind

Referenced by XrdFrmConfig::Configure(), XrdConfig::Configure(), XrdXrootdProtocol::Configure(), XrdCmsConfig::Configure1(), getargs(), and main().

char* Prog [static]

Definition at line 45 of file rpasswd.c.

Referenced by XrdCmsNode::fsExec().

char r_passwd[256] [static]

Definition at line 48 of file rpasswd.c.

char r_tconf[256] [static]

Definition at line 47 of file rpasswd.c.


Generated on Tue Jul 5 16:07:59 2011 for ROOT_528-00b_version by  doxygen 1.5.1