From 14b438e90ac44acb2b66354a5ad16779ae0c88b2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Sep 2003 12:21:08 +0000 Subject: Only set sids when they're retrurned by the MySQL query (This used to be commit 9a603f6f077a2e1ddc41849cca3641421ecbaf11) --- source3/passdb/pdb_mysql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/passdb/pdb_mysql.c b/source3/passdb/pdb_mysql.c index d3eb7cb975..6c200be504 100644 --- a/source3/passdb/pdb_mysql.c +++ b/source3/passdb/pdb_mysql.c @@ -240,9 +240,9 @@ static NTSTATUS row_to_sam_account(MYSQL_RES * r, SAM_ACCOUNT * u) pdb_set_unknown_str(u, row[16], PDB_SET); pdb_set_munged_dial(u, row[17], PDB_SET); - string_to_sid(&sid, row[18]); + if(row[18])string_to_sid(&sid, row[18]); pdb_set_user_sid(u, &sid, PDB_SET); - string_to_sid(&sid, row[19]); + if(row[19])string_to_sid(&sid, row[19]); pdb_set_group_sid(u, &sid, PDB_SET); if (pdb_gethexpwd(row[20], temp), PDB_SET) -- cgit