Groups > Novell > NDS Client > Re: NWGetUserInfo() -> HELP!!!!!!!




NWGetUserInfo() and eDir 8.7.3

NWGetUserInfo() and eDir 8.7.3
Tue, 29 Mar 2005 05:45:03 GMT
Hi all

I use NWGetUserInfo() for getting user names from my NetWare 5.1 
servers. By this function  I got  users' names with their full context 
while at the servers was setting NDS 7.62C. After an upgrade to eDir 
8.7.3 I get only short names of my users by this function. It is not 
very well for my app, because I need a full user context for my future 
  handlings.

Thanks for any ideas,
Post Reply
Re: NWGetUserInfo() and eDir 8.7.3
Tue, 29 Mar 2005 05:52:03 GMT
Victor Kulichkin wrote:
> Hi all
>
> I use NWGetUserInfo() for getting user names from my NetWare 5.1
> servers. By this function  I got  users' names with their full context
> while at the servers was setting NDS 7.62C. After an upgrade to eDir
> 8.7.3 I get only short names of my users by this function. It is not
> very well for my app, because I need a full user context for my future
>   handlings.

Could you reproduce this problem in a small complete program and post it
here, please?

Dmitry

Post Reply
Re: NWGetUserInfo() and eDir 8.7.3
Tue, 29 Mar 2005 11:08:13 GMT
Dmitry Mityugov wrote:
> Victor Kulichkin wrote:
> 
>>Hi all
>>
>>I use NWGetUserInfo() for getting user names from my NetWare 5.1
>>servers. By this function  I got  users' names with their full context
>>while at the servers was setting NDS 7.62C. After an upgrade to eDir
>>8.7.3 I get only short names of my users by this function. It is not
>>very well for my app, because I need a full user context for my future
>>  handlings.
> 
> 
> Could you reproduce this problem in a small complete program and post it
> here, please?
> 
> Dmitry
> 
> 

Ok!
Here you are.

///////////////////////////
NWFSE_ACTIVE_CONN_LIST connList;
nuint32 connType;
unsigned char loopCount, bitVal;
CUIntArray MyNumberConn;
NWFSE_USER_INFO fseUserInfo; //for NWGetUserInfo
char name[MAX_DN_BYTES];
NWINET_ADDR  InetAddr, InetAddrStation;


ccode =  NWDSAuthenticateConn(context, connHandle);
if (ccode)
{
  ... error
}
//define connections at the server
nuint32 connType = FSE_NCP_CONNECTION_TYPE; //for IPX
for (int z = 0; z < 2; z++) //2 cycles - for IPX and for IP
{
	ccode = NWGetActiveConnListByType(connHandle, 1L, connType, 			 
&connList);
	if (ccode)
	 { ....Error....}
	for (int t = 0; t < 511; t++)
	{
		if (connList.activeConnBitList[t] != 0)
		{
			for (bitVal = 128, loopCount = 0; bitVal >= 1; 						bitVal = bitVal 
/ 2, loopCount++)
			{
			if (connList.activeConnBitList[t] & bitVal)
				MyNumberConn.Add((t * 8) + loopCount);
			}
                  }
	}
	//define user names and MAC addressess
	int index = MyNumberConn.GetSize();
	if ( index == 0) //no connections
	{
	 	NWCCCloseConn(connHandle);
		goto NextNCP;
	}
	for (int t = 0; t < index; t++ )
	{
		ccode = NWGetUserInfo(connHandle, MyNumberConn.GetAt(t), 			name, 
&fseUserInfo);
		switch (ccode)
		{
		case SUCCESSFUL:
		 	if (strcmp(name, "NOT_LOGGED_IN") == 0)
				break;
			//define MAC address
			ccode = NWGetInetAddr (connHandle, 							MyNumberConn.GetAt(t), 
&InetAddr);
			if (ccode)
			{
				.... error .....
			}
			//check a name
			//check a MAC address
			for (int y = 0; y <= 5; y++)
			{
				if (InetAddr.netNodeAddr[y] != 				 
InetAddrStation.netNodeAddr[y])
				goto NoMAc;
			}
			userName = "! ";
			userName += name; //we found a name by MAC
			goto _FreeContext; //END!!!
NoMAc:
			//check a IP address
			for (int y = 0; y <= 3; y++)
			{
				if (InetAddr.networkAddr[y] != 	      						 
InetAddrStation.networkAddr[y])
				goto NoIP;
			}
			userName = "! ";
			userName += name; //we found a name by IP
			goto _FreeContext; //!!!!END
NoIP:
			break;
		case BAD_STATION_NUMBER:
			break; //not active connection
		case INVALID_PARAMETERS:
			break;
		case 0x897d: //NOT_LOGGED_IN for NWGetUserInfo
			break;
		case 0x89ff: // something is missing for NWGetUserInfo
			break;
		default:
		 .....ERROR.......
		}
	}

NextNCP:
	connType = FSE_UDP_CONNECTION_TYPE; // NCP connection over IP 		 
MyNumberConn.RemoveAll();
}

Post Reply
Re: NWGetUserInfo() -> HELP!!!!!!!
Fri, 01 Apr 2005 07:35:33 GMT
I think that the problem with this NWGetUserInfo() is not only in my 
codes. I tried to use the program USERINFO from the Novell example:

http://developer.novell.com/support/sample/tids/rusrinfo/rusrinfo.htm

and got the same result - user names are also without a NDS context in 
the eDir 8.7.3 environment. I noticed that the context has disappeared 
in the utility Send Message in Novell Client.

Ok! If this function has a problem with this, then maybe there is 
another way to get a full user name by connection numbers.
In any case the MONITOR shows us users with their full context with any 
eDir.

Any ideas - help!!!

Post Reply
Re: NWGetUserInfo() -> HELP!!!!!!!
Fri, 01 Apr 2005 19:30:09 GMT
Victor Kulichkin wrote:
> I think that the problem with this NWGetUserInfo() is not only in my 
> codes. I tried to use the program USERINFO from the Novell example:
> 
> http://developer.novell.com/support/sample/tids/rusrinfo/rusrinfo.htm
> 
> and got the same result - user names are also without a NDS context in 
> the eDir 8.7.3 environment. I noticed that the context has disappeared 
> in the utility Send Message in Novell Client.
> 
> Ok! If this function has a problem with this, then maybe there is 
> another way to get a full user name by connection numbers.
> In any case the MONITOR shows us users with their full context with any 
> eDir.
> 
> Any ideas - help!!!
> 
> Victor.

Hello Victor,

Maybe you can use NWGetConnectionInformation to obtain the objID and 
solve the user with NWDSMapIDToName.

Post Reply
<< Previous 1 2 3 Next >>
( Page 1 of 3 )
about | contact