Loading...
Searching...
No Matches
XrdSecProtocolpwd.hh File Reference
`#include "XrdNet/XrdNetAddrInfo.hh"`
`#include "XrdOuc/XrdOucErrInfo.hh"`
`#include "XrdSys/XrdSysPthread.hh"`
`#include "XrdOuc/XrdOucString.hh"`
`#include "XrdOuc/XrdOucTokenizer.hh"`
`#include "XrdSec/XrdSecInterface.hh"`
`#include "XrdSecpwd/XrdSecpwdTrace.hh"`
`#include "XrdSut/XrdSutPFEntry.hh"`
`#include "XrdSut/XrdSutPFile.hh"`
`#include "XrdSut/XrdSutBuffer.hh"`
`#include "XrdSut/XrdSutRndm.hh"`
`#include "XrdCrypto/XrdCryptoAux.hh"`
`#include "XrdCrypto/XrdCryptoCipher.hh"`
`#include "XrdCrypto/XrdCryptoFactory.hh"`
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)
#define | REL2(x, y)
#define | REL3(x, y, z)
#define | SafeDelArray(x)
#define | SafeDelete(x)
#define | XrdCryptoMax 10
#define | XrdSecDEBUG 0x1000
#define | XrdSecNOIPCHK 0x0001
#define | XrdSecPROTOIDENT "pwd"
#define | XrdSecPROTOIDLEN sizeof(XrdSecPROTOIDENT)
#define | XrdSecpwdVERSION 10100

## 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 | ) |

Value:
{ if (x) delete x; }

Definition at line 198 of file XrdSecProtocolpwd.hh.

## REL2

#define REL2 | ( |  | x,
|  |  | y )

Value:
{ if (x) delete x; if (y) delete y; }

Definition at line 199 of file XrdSecProtocolpwd.hh.

Referenced by XrdSecProtocolpwd::Authenticate(), and XrdSecProtocolpwd::getCredentials().

## REL3

#define REL3 | ( |  | x,
|  |  | y,
|  |  | z )

Value:
{ if (x) delete x; if (y) delete y; if (z) delete z; }

Definition at line 200 of file XrdSecProtocolpwd.hh.

## SafeDelArray

#define SafeDelArray | ( |  | x | ) |

Value:
{ if (x) delete [] x ; x = 0; }

Definition at line 209 of file XrdSecProtocolpwd.hh.

Referenced by XrdSecProtocolpwd::Authenticate(), and XrdSecProtocolpwd::getCredentials().

## SafeDelete

#define SafeDelete | ( |  | x | ) |

Value:
{ if (x) delete x ; x = 0; }

Definition at line 208 of file XrdSecProtocolpwd.hh.

Referenced by pwdHSVars::~pwdHSVars(), XrdSecProtocolpwd::Authenticate(), and XrdSecProtocolpwd::Delete().

## XrdCryptoMax

#define XrdCryptoMax 10

Definition at line 59 of file XrdSecProtocolpwd.hh.

Referenced by XrdSecProtocolpwd::Init(), and XrdSecProtocolpwd::PrintTimeStat().

## 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.

Referenced by XrdSecProtocolpwd::XrdSecProtocolpwd(), XrdSecProtocolpwd::Authenticate(), and XrdSecProtocolpwd::getCredentials().

## XrdSecPROTOIDLEN

#define XrdSecPROTOIDLEN sizeof(XrdSecPROTOIDENT)

Definition at line 55 of file XrdSecProtocolpwd.hh.

Referenced by XrdSecProtocolpwd::XrdSecProtocolpwd(), and XrdSecProtocolpwd::Authenticate().

## XrdSecpwdVERSION

#define XrdSecpwdVERSION 10100

Definition at line 56 of file XrdSecProtocolpwd.hh.

## Enumeration Type Documentation

## kpwdAutoreg

enum kpwdAutoreg

Enumerator
kpAR_none |
kpAR_users |
kpAR_all |

Definition at line 75 of file XrdSecProtocolpwd.hh.

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

## kpwdClientSteps

enum 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.

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

## kpwdCredsActions

enum kpwdCredsActions

Enumerator
kpCA_undef |
kpCA_check |
kpCA_checkold |
kpCA_cache |
kpCA_checkcache |

Definition at line 116 of file XrdSecProtocolpwd.hh.

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

## kpwdCredsInput

enum kpwdCredsInput

Enumerator
kpCI_undef |
kpCI_prompt |
kpCI_exact |
kpCI_wildcard |

Definition at line 91 of file XrdSecProtocolpwd.hh.

{
kpCI_undef = -1, // undefined
kpCI_prompt = 0, // from prompt
kpCI_exact = 1, // from FileNetRc, exact tag
kpCI_wildcard = 2 // from FileNetRc, wildcard tag
};
kpCI_prompt
@ kpCI_prompt
Definition XrdSecProtocolpwd.hh:93
kpCI_exact
@ kpCI_exact
Definition XrdSecProtocolpwd.hh:94
kpCI_undef
@ kpCI_undef
Definition XrdSecProtocolpwd.hh:92
kpCI_wildcard
@ kpCI_wildcard
Definition XrdSecProtocolpwd.hh:95

## kpwdCredType

enum 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.

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

## 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.

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

## kpwdServerSteps

enum 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.

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

## kpwdStatus

enum kpwdStatus

Enumerator
kpST_error |
kpST_ok |
kpST_more |

Definition at line 67 of file XrdSecProtocolpwd.hh.

{
kpST_error = -1, // error occurred
kpST_ok = 0, // ok
kpST_more = 1 // need more info
};
kpST_ok
@ kpST_ok
Definition XrdSecProtocolpwd.hh:69
kpST_more
@ kpST_more
Definition XrdSecProtocolpwd.hh:70
kpST_error
@ kpST_error
Definition XrdSecProtocolpwd.hh:68

## kpwdUpdate

enum kpwdUpdate

Enumerator
kpUP_none |
kpUP_remove |
kpUP_all |

Definition at line 83 of file XrdSecProtocolpwd.hh.

{
kpUP_none = 0, // no update
kpUP_remove = 1, // remove obsolete entries only
kpUP_all = 2 // remove obsolete entries and register new valid info
};
kpUP_remove
@ kpUP_remove
Definition XrdSecProtocolpwd.hh:85
kpUP_all
@ kpUP_all
Definition XrdSecProtocolpwd.hh:86
kpUP_none
@ kpUP_none
Definition XrdSecProtocolpwd.hh:84