22.12.2012 Views

Front cover - IBM Redbooks

Front cover - IBM Redbooks

Front cover - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

}<br />

ValueLength -= sizeof(WORD);<br />

/* check the value DataType */<br />

switch (DataType) {<br />

case TYPE_TEXT_LIST:<br />

break;<br />

}<br />

case TYPE_TEXT:<br />

break;<br />

default:<br />

return -1;<br />

/* Allocate space for the info. This memory will be freed<br />

* automatically when the thread terminates.<br />

*/<br />

newSpace = (context->AllocMem)(context, ValueLength+1,<br />

reserved, &errID);<br />

*pInfo = (char *) newSpace;<br />

if (NULL == *pInfo) {<br />

printf ("Out of memory\n");<br />

return -1;<br />

}<br />

/* Get the info */<br />

error = NAMEGetTextItem2(pMatch, /* match that we found */<br />

itemNumber, /* item # in order of item<br />

* on lookup */<br />

0, /* Member # of item in text<br />

* lists */<br />

*pInfo, /* buffer to copy result<br />

* into */<br />

MAX_BUF_LEN); /* Length of buffer */<br />

if (!error) {<br />

*pInfoLen = strlen(*pInfo)+1;<br />

return 0;<br />

}<br />

return -1;<br />

int doAuthenticate(char *userName, char *domain, char *password) {<br />

/*<br />

* Description: See if the user is known to the operating system, and if<br />

* so, check that the password can be verified.<br />

652 Lotus Security Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!