Hi Everybody, It seems that there is a bug in the implementation of the MS Windows API function NetSessionEnum. I am using Windows XP against a Samba 3.023d domain controller. When NetSessionEnum is successful it is supposed to return either NERR_Success (0) when it is finished or ERROR_MORE_DATA when there is more data outstanding. In my program which tries to retrieve all currently logged-on users from the domain controller, NetSessionEnum always return NERR_Success, even if there is more data to come. NetSessionEnum returns data in chunks of 32 entries. So it pretends to be finished after the first 32 entries retrieved. I've developped a workaround for this, but I still think it is wrong. I'm not sure whether the bug is in Windows or in Samba, as I have no Windows based domain controller to test it. But I could imagine that the Samba server gives an incorrect response. BTW, the problem does not occur in my own program only, but can be reproduced in the computer management console of Windows XP like this: Open the computer management console, select Action->Connect to another computer, connect to the domain controller, click System Tools->Shared Folders->Sessions, and you will never see more than 32 entries, even if many more people are connected. Best, Peter Rindfuss
Gerald (Jerry) Carter
2007-Jan-22 14:06 UTC
[Samba] Bug in NetSessionEnum implementation ?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Peter Rindfuss wrote:> Hi Everybody, > > It seems that there is a bug in the implementation of the MS Windows API > function NetSessionEnum. I am using Windows XP against a Samba 3.023d > domain controller. > > When NetSessionEnum is successful it is supposed to return either > NERR_Success (0) when it is finished or ERROR_MORE_DATA when there is > more data outstanding.Could you test the SAMBA_3_0_24 branch? That code has already been reworked. cheers, jerry ====================================================================Samba ------- http://www.samba.org Centeris ----------- http://www.centeris.com "What man is a man who does not make the world better?" --Balian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFtMS9IR7qMdg1EfYRAnftAKDZpOn+22DApb6Gc6Mgic7jIvIGoACg0vqY JrKuyMZZYPsdVyQ2kaA3BAY=r0E1 -----END PGP SIGNATURE-----