XRootD
XrdSecProtocolpwd.hh File Reference
+ Include dependency graph for XrdSecProtocolpwd.hh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pwdHSVars
 
class  pwdOptions
 
struct  pwdStatus_t
 
class  XrdSecProtocolpwd
 

Macros

#define kMAXBUFLEN   1024
 
#define kMAXPWDLEN   64
 
#define kMAXUSRLEN   9
 
#define REL1(x)   { if (x) delete x; }
 
#define REL2(x, y)   { if (x) delete x; if (y) delete y; }
 
#define REL3(x, y, z)   { if (x) delete x; if (y) delete y; if (z) delete z; }
 
#define SafeDelArray(x)   { if (x) delete [] x ; x = 0; }
 
#define SafeDelete(x)   { if (x) delete x ; x = 0; }
 
#define XrdCryptoMax   10
 
#define XrdSecDEBUG   0x1000
 
#define XrdSecNOIPCHK   0x0001
 
#define XrdSecPROTOIDENT   "pwd"
 
#define XrdSecPROTOIDLEN   sizeof(XrdSecPROTOIDENT)
 
#define XrdSecpwdVERSION   10100
 

Typedefs

typedef XrdOucString String
 

Enumerations

enum  kpwdAutoreg {
  kpAR_none = 0 ,
  kpAR_users = 1 ,
  kpAR_all = 2
}
 
enum  kpwdClientSteps {
  kXPC_none = 0 ,
  kXPC_normal = 1000 ,
  kXPC_verifysrv ,
  kXPC_signedrtag ,
  kXPC_creds ,
  kXPC_autoreg ,
  kXPC_failureack ,
  kXPC_reserved
}
 
enum  kpwdCredsActions {
  kpCA_undef = -1 ,
  kpCA_check = 0 ,
  kpCA_checkold = 1 ,
  kpCA_cache = 2 ,
  kpCA_checkcache = 3
}
 
enum  kpwdCredsInput {
  kpCI_undef = -1 ,
  kpCI_prompt = 0 ,
  kpCI_exact = 1 ,
  kpCI_wildcard = 2
}
 
enum  kpwdCredType {
  kpCT_undef = -1 ,
  kpCT_normal = 0 ,
  kpCT_onetime = 1 ,
  kpCT_old = 2 ,
  kpCT_new = 3 ,
  kpCT_newagain = 4 ,
  kpCT_autoreg = 5 ,
  kpCT_ar_again = 6 ,
  kpCT_crypt = 7 ,
  kpCT_afs = 8 ,
  kpCT_afsenc = 9
}
 
enum  kpwdErrors {
  kPWErrParseBuffer = 10000 ,
  kPWErrDecodeBuffer ,
  kPWErrLoadCrypto ,
  kPWErrBadProtocol ,
  kPWErrNoUserHost ,
  kPWErrNoUser ,
  kPWErrNoHost ,
  kPWErrBadUser ,
  kPWErrCreateBucket ,
  kPWErrDuplicateBucket ,
  kPWErrCreateBuffer ,
  kPWErrSerialBuffer ,
  kPWErrGenCipher ,
  kPWErrExportPuK ,
  kPWErrEncRndmTag ,
  kPWErrBadRndmTag ,
  kPWErrNoRndmTag ,
  kPWErrNoCipher ,
  kPWErrQueryCreds ,
  kPWErrNoCreds ,
  kPWErrBadPasswd ,
  kPWErrBadCache ,
  kPWErrNoCache ,
  kPWErrNoSessID ,
  kPWErrBadSessID ,
  kPWErrBadOpt ,
  kPWErrMarshal ,
  kPWErrUnmarshal ,
  kPWErrSaveCreds ,
  kPWErrNoSalt ,
  kPWErrNoBuffer ,
  kPWErrRefCipher ,
  kPWErrNoPublic ,
  kPWErrAddBucket ,
  kPWErrFinCipher ,
  kPWErrInit ,
  kPWErrBadCreds ,
  kPWErrError
}
 
enum  kpwdServerSteps {
  kXPS_none = 0 ,
  kXPS_init = 2000 ,
  kXPS_credsreq ,
  kXPS_rtag ,
  kXPS_signedrtag ,
  kXPS_newpuk ,
  kXPS_puk ,
  kXPS_failure ,
  kXPS_reserved
}
 
enum  kpwdStatus {
  kpST_error = -1 ,
  kpST_ok = 0 ,
  kpST_more = 1
}
 
enum  kpwdUpdate {
  kpUP_none = 0 ,
  kpUP_remove = 1 ,
  kpUP_all = 2
}
 

Class Documentation

◆ pwdStatus_t

struct pwdStatus_t

Definition at line 192 of file XrdSecProtocolpwd.hh.

+ Collaboration diagram for pwdStatus_t:
Class Members
char action
char ctype
short options

Macro Definition Documentation

◆ kMAXBUFLEN

#define kMAXBUFLEN   1024

Definition at line 61 of file XrdSecProtocolpwd.hh.

◆ kMAXPWDLEN

#define kMAXPWDLEN   64

Definition at line 63 of file XrdSecProtocolpwd.hh.

◆ kMAXUSRLEN

#define kMAXUSRLEN   9

Definition at line 62 of file XrdSecProtocolpwd.hh.

◆ REL1

#define REL1 (   x)    { if (x) delete x; }

Definition at line 198 of file XrdSecProtocolpwd.hh.

◆ REL2

#define REL2 (   x,
 
)    { if (x) delete x; if (y) delete y; }

Definition at line 199 of file XrdSecProtocolpwd.hh.

◆ REL3

#define REL3 (   x,
  y,
 
)    { if (x) delete x; if (y) delete y; if (z) delete z; }

Definition at line 200 of file XrdSecProtocolpwd.hh.

◆ SafeDelArray

#define SafeDelArray (   x)    { if (x) delete [] x ; x = 0; }

Definition at line 209 of file XrdSecProtocolpwd.hh.

◆ SafeDelete

#define SafeDelete (   x)    { if (x) delete x ; x = 0; }

Definition at line 208 of file XrdSecProtocolpwd.hh.

◆ XrdCryptoMax

#define XrdCryptoMax   10

Definition at line 59 of file XrdSecProtocolpwd.hh.

◆ XrdSecDEBUG

#define XrdSecDEBUG   0x1000

Definition at line 58 of file XrdSecProtocolpwd.hh.

◆ XrdSecNOIPCHK

#define XrdSecNOIPCHK   0x0001

Definition at line 57 of file XrdSecProtocolpwd.hh.

◆ XrdSecPROTOIDENT

#define XrdSecPROTOIDENT   "pwd"

Definition at line 54 of file XrdSecProtocolpwd.hh.

◆ XrdSecPROTOIDLEN

#define XrdSecPROTOIDLEN   sizeof(XrdSecPROTOIDENT)

Definition at line 55 of file XrdSecProtocolpwd.hh.

◆ XrdSecpwdVERSION

#define XrdSecpwdVERSION   10100

Definition at line 56 of file XrdSecProtocolpwd.hh.

Typedef Documentation

◆ String

Definition at line 52 of file XrdSecProtocolpwd.hh.

Enumeration Type Documentation

◆ kpwdAutoreg

Enumerator
kpAR_none 
kpAR_users 
kpAR_all 

Definition at line 75 of file XrdSecProtocolpwd.hh.

75  {
76  kpAR_none = 0, // autoreg disabled
77  kpAR_users = 1, // only for tags in password files (local, system's)
78  kpAR_all = 2 // for all tags
79 };
@ kpAR_none
@ kpAR_all
@ kpAR_users

◆ kpwdClientSteps

Enumerator
kXPC_none 
kXPC_normal 
kXPC_verifysrv 
kXPC_signedrtag 
kXPC_creds 
kXPC_autoreg 
kXPC_failureack 
kXPC_reserved 

Definition at line 125 of file XrdSecProtocolpwd.hh.

125  {
126  kXPC_none = 0,
127  kXPC_normal = 1000, // 1000: standard packet
128  kXPC_verifysrv, // 1001: request for server verification
129  kXPC_signedrtag, // 1002: signed rtag (after server request for verification)
130  kXPC_creds, // 1003: credentials packet
131  kXPC_autoreg, // 1004: query for autoregistration
132  kXPC_failureack, // 1005: failure acknowledgement
133  kXPC_reserved //
134 };
@ kXPC_failureack
@ kXPC_autoreg
@ kXPC_reserved
@ kXPC_signedrtag
@ kXPC_normal
@ kXPC_creds
@ kXPC_verifysrv
@ kXPC_none

◆ kpwdCredsActions

Enumerator
kpCA_undef 
kpCA_check 
kpCA_checkold 
kpCA_cache 
kpCA_checkcache 

Definition at line 116 of file XrdSecProtocolpwd.hh.

116  {
117  kpCA_undef = -1, // undefined
118  kpCA_check = 0, // normal check of credentials
119  kpCA_checkold = 1, // check current creds before asking for new ones
120  kpCA_cache = 2, // cache received (new) credentials
121  kpCA_checkcache = 3 // check cached credentials and save them, if ok
122 };
@ kpCA_cache
@ kpCA_undef
@ kpCA_checkold
@ kpCA_check
@ kpCA_checkcache

◆ kpwdCredsInput

Enumerator
kpCI_undef 
kpCI_prompt 
kpCI_exact 
kpCI_wildcard 

Definition at line 91 of file XrdSecProtocolpwd.hh.

91  {
92  kpCI_undef = -1, // undefined
93  kpCI_prompt = 0, // from prompt
94  kpCI_exact = 1, // from FileNetRc, exact tag
95  kpCI_wildcard = 2 // from FileNetRc, wildcard tag
96 };
@ kpCI_prompt
@ kpCI_exact
@ kpCI_undef
@ kpCI_wildcard

◆ kpwdCredType

Enumerator
kpCT_undef 
kpCT_normal 
kpCT_onetime 
kpCT_old 
kpCT_new 
kpCT_newagain 
kpCT_autoreg 
kpCT_ar_again 
kpCT_crypt 
kpCT_afs 
kpCT_afsenc 

Definition at line 100 of file XrdSecProtocolpwd.hh.

100  {
101  kpCT_undef = -1, // undefined
102  kpCT_normal = 0, // confirmed credentials
103  kpCT_onetime = 1, // one-time credentials
104  kpCT_old = 2, // old credentials to be changed
105  kpCT_new = 3, // new credentials to be confirmed
106  kpCT_newagain = 4, // new credentials again for confirmation
107  kpCT_autoreg = 5, // autoreg: new creds to be confirmed
108  kpCT_ar_again = 6, // autoreg: new creds again for confirmation
109  kpCT_crypt = 7, // standard crypt hash
110  kpCT_afs = 8, // AFS plain password
111  kpCT_afsenc = 9 // AFS encrypted password
112 };
@ kpCT_afs
@ kpCT_old
@ kpCT_autoreg
@ kpCT_onetime
@ kpCT_newagain
@ kpCT_normal
@ kpCT_new
@ kpCT_crypt
@ kpCT_undef
@ kpCT_afsenc
@ kpCT_ar_again

◆ kpwdErrors

enum kpwdErrors
Enumerator
kPWErrParseBuffer 
kPWErrDecodeBuffer 
kPWErrLoadCrypto 
kPWErrBadProtocol 
kPWErrNoUserHost 
kPWErrNoUser 
kPWErrNoHost 
kPWErrBadUser 
kPWErrCreateBucket 
kPWErrDuplicateBucket 
kPWErrCreateBuffer 
kPWErrSerialBuffer 
kPWErrGenCipher 
kPWErrExportPuK 
kPWErrEncRndmTag 
kPWErrBadRndmTag 
kPWErrNoRndmTag 
kPWErrNoCipher 
kPWErrQueryCreds 
kPWErrNoCreds 
kPWErrBadPasswd 
kPWErrBadCache 
kPWErrNoCache 
kPWErrNoSessID 
kPWErrBadSessID 
kPWErrBadOpt 
kPWErrMarshal 
kPWErrUnmarshal 
kPWErrSaveCreds 
kPWErrNoSalt 
kPWErrNoBuffer 
kPWErrRefCipher 
kPWErrNoPublic 
kPWErrAddBucket 
kPWErrFinCipher 
kPWErrInit 
kPWErrBadCreds 
kPWErrError 

Definition at line 150 of file XrdSecProtocolpwd.hh.

150  {
151  kPWErrParseBuffer = 10000, // 10000
152  kPWErrDecodeBuffer, // 10001
153  kPWErrLoadCrypto, // 10002
154  kPWErrBadProtocol, // 10003
155  kPWErrNoUserHost, // 10004
156  kPWErrNoUser, // 10005
157  kPWErrNoHost, // 10006
158  kPWErrBadUser, // 10007
159  kPWErrCreateBucket, // 10008
160  kPWErrDuplicateBucket, // 10009
161  kPWErrCreateBuffer, // 10010
162  kPWErrSerialBuffer, // 10011
163  kPWErrGenCipher, // 10012
164  kPWErrExportPuK, // 10013
165  kPWErrEncRndmTag, // 10014
166  kPWErrBadRndmTag, // 10015
167  kPWErrNoRndmTag, // 10016
168  kPWErrNoCipher, // 10017
169  kPWErrQueryCreds, // 10018
170  kPWErrNoCreds, // 10019
171  kPWErrBadPasswd, // 10020
172  kPWErrBadCache, // 10021
173  kPWErrNoCache, // 10022
174  kPWErrNoSessID, // 10023
175  kPWErrBadSessID, // 10024
176  kPWErrBadOpt, // 10025
177  kPWErrMarshal, // 10026
178  kPWErrUnmarshal, // 10027
179  kPWErrSaveCreds, // 10028
180  kPWErrNoSalt, // 10029
181  kPWErrNoBuffer, // 10030
182  kPWErrRefCipher, // 10031
183  kPWErrNoPublic, // 10032
184  kPWErrAddBucket, // 10033
185  kPWErrFinCipher, // 10034
186  kPWErrInit, // 10034
187  kPWErrBadCreds, // 10035
188  kPWErrError // 10036
189 };
@ kPWErrParseBuffer
@ kPWErrBadOpt
@ kPWErrMarshal
@ kPWErrNoBuffer
@ kPWErrBadCreds
@ kPWErrBadPasswd
@ kPWErrSaveCreds
@ kPWErrEncRndmTag
@ kPWErrNoSessID
@ kPWErrExportPuK
@ kPWErrNoCipher
@ kPWErrNoSalt
@ kPWErrBadCache
@ kPWErrUnmarshal
@ kPWErrSerialBuffer
@ kPWErrBadUser
@ kPWErrQueryCreds
@ kPWErrNoUserHost
@ kPWErrInit
@ kPWErrNoPublic
@ kPWErrBadSessID
@ kPWErrNoCreds
@ kPWErrDuplicateBucket
@ kPWErrBadProtocol
@ kPWErrNoUser
@ kPWErrCreateBucket
@ kPWErrFinCipher
@ kPWErrLoadCrypto
@ kPWErrRefCipher
@ kPWErrBadRndmTag
@ kPWErrDecodeBuffer
@ kPWErrNoCache
@ kPWErrGenCipher
@ kPWErrNoRndmTag
@ kPWErrError
@ kPWErrCreateBuffer
@ kPWErrAddBucket
@ kPWErrNoHost

◆ kpwdServerSteps

Enumerator
kXPS_none 
kXPS_init 
kXPS_credsreq 
kXPS_rtag 
kXPS_signedrtag 
kXPS_newpuk 
kXPS_puk 
kXPS_failure 
kXPS_reserved 

Definition at line 137 of file XrdSecProtocolpwd.hh.

137  {
138  kXPS_none = 0,
139  kXPS_init = 2000, // 2000: fake code used the first time
140  kXPS_credsreq, // 2001: request for credentials
141  kXPS_rtag, // 2002: rndm tag to be signed (strong verification)
142  kXPS_signedrtag, // 2003: signed rtag (after client request for verification)
143  kXPS_newpuk, // 2004: new public part for session ciphers
144  kXPS_puk, // 2005: public part for session ciphers (after autoreg)
145  kXPS_failure, // 2006: signal failure to client to drop invalid cached info
146  kXPS_reserved //
147 };
@ kXPS_puk
@ kXPS_credsreq
@ kXPS_failure
@ kXPS_reserved
@ kXPS_none
@ kXPS_init
@ kXPS_signedrtag
@ kXPS_newpuk
@ kXPS_rtag

◆ kpwdStatus

enum kpwdStatus
Enumerator
kpST_error 
kpST_ok 
kpST_more 

Definition at line 67 of file XrdSecProtocolpwd.hh.

67  {
68  kpST_error = -1, // error occurred
69  kpST_ok = 0, // ok
70  kpST_more = 1 // need more info
71 };
@ kpST_ok
@ kpST_more
@ kpST_error

◆ kpwdUpdate

enum kpwdUpdate
Enumerator
kpUP_none 
kpUP_remove 
kpUP_all 

Definition at line 83 of file XrdSecProtocolpwd.hh.

83  {
84  kpUP_none = 0, // no update
85  kpUP_remove = 1, // remove obsolete entries only
86  kpUP_all = 2 // remove obsolete entries and register new valid info
87 };
@ kpUP_remove
@ kpUP_all
@ kpUP_none