Bug 2316 - Postgresql passdb backend - SID problems
Summary: Postgresql passdb backend - SID problems
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts (show other bugs)
Version: 3.0.11
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Jelmer Vernooij
QA Contact: Samba QA Contact
URL: http://www.snt.utwente.nl/~justin/mis...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-07 03:22 UTC by Justin Ossevoort
Modified: 2005-08-24 10:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Ossevoort 2005-02-07 03:22:12 UTC
When trying out the pdb_pgsql passdb backend we found some problems which made 
it unusable. There was a case where there were no SID's in the database. The 
code checks for the absense of these, but afterwards it still sets the 
(uninitialized variables) in the session. This causes 'pdbedit -L' to crash 
since the sid to text translator probably walks out of the buffer.
Anyways, it was fixed and later verified agains the pdb_mysql which does 
exactly the same as our initial fix.

This patch also fixes a small bug in a debug print, which uses '%llu' to print 
the number of rows, which in reality is a 'int' in the postgresql interface. So 
it is fixed to '%d', no crashes here, just more sane debugging.
Comment 1 Justin Ossevoort 2005-02-14 04:16:21 UTC
(In reply to comment #0)
The patch is in the URL ;)
Comment 2 Jelmer Vernooij 2005-03-10 15:49:23 UTC
Applied to both 3.0 and trunk. Thanks for the patch!
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:16:06 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.