samsync: don't put "" into fields that should be null
Ronan Waide
waider at waider.ie
Wed Mar 19 14:55:32 GMT 2003
This patch prevents net rpc vampire from copying empty strings into
various fields; doing so can cause problems with pdb_ldap (and
possibly others).
Cheers,
Waider.
Index: source/utils/net_rpc_samsync.c
===================================================================
RCS file: /cvsroot/samba/source/utils/net_rpc_samsync.c,v
retrieving revision 1.18
diff -r1.18 net_rpc_samsync.c
218c218,219
< pdb_set_fullname(account, s, PDB_CHANGED);
---
> if ( strlen( s ))
> pdb_set_fullname(account, s, PDB_CHANGED);
221c222,223
< pdb_set_homedir(account, s, PDB_CHANGED);
---
> if ( strlen( s ))
> pdb_set_homedir(account, s, PDB_CHANGED);
224c226,227
< pdb_set_dir_drive(account, s, PDB_CHANGED);
---
> if ( strlen( s ))
> pdb_set_dir_drive(account, s, PDB_CHANGED);
227c230,231
< pdb_set_logon_script(account, s, PDB_CHANGED);
---
> if ( strlen( s ))
> pdb_set_logon_script(account, s, PDB_CHANGED);
230c234,235
< pdb_set_acct_desc(account, s, PDB_CHANGED);
---
> if ( strlen( s ))
> pdb_set_acct_desc(account, s, PDB_CHANGED);
233c238,239
< pdb_set_workstations(account, s, PDB_CHANGED);
---
> if ( strlen( s ))
> pdb_set_workstations(account, s, PDB_CHANGED);
236c242,243
< pdb_set_profile_path(account, s, PDB_CHANGED);
---
> if ( strlen( s ))
> pdb_set_profile_path(account, s, PDB_CHANGED);
402c409,411
< fstrcpy(map.comment, comment);
---
>
> if ( strlen( comment ))
> fstrcpy(map.comment, comment);
--
waider at waider.ie / Yes, it /is/ very personal of me.
"Repetition breeds inertia." - Douglas Coupland, _Microserfs_
More information about the samba-technical
mailing list