~ubuntu-branches/ubuntu/gutsy/samba/gutsy-updates

« back to all changes in this revision

Viewing changes to source/registry/reg_db.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2006-11-28 20:14:37 UTC
  • mfrom: (0.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128201437-a6x4lzlhempazocp
Tags: 3.0.23d-1ubuntu1
* Merge from debian unstable.
* Drop python2.4-samba, replace with python-samba. Added Conflicts/Replaces
  on python2.4-samba
* Drop track-connection-dos.patch, ubuntu-winbind-panic.patch, 
  ubuntu-fix-ldap.patch, ubuntu-setlocale.patch, ubuntu-setlocale-fixes.patch
* Remaining Ubuntu changes:
  - Revert Debian's installation of mount.cifs and umount.cifs as suid
  - Comment out the default [homes] shares and add more verbose comments to
    explain what they do and how they work (closes: launchpad.net/27608)
  - Add a "valid users = %S" stanza to the commented-out [homes] section, to
    show users how to restrict access to \\server\username to only username.
  - Change the (commented-out) "printer admin" example to use "@lpadmin"
    instead of "@ntadmin", since the lpadmin group is used for spool admin.
  - Alter the panic-action script to encourage users to report their
    bugs in Ubuntu packages to Ubuntu, rather than reporting to Debian.
    Modify text to more closely match the Debian script
  - Munge our init script to deal with the fact that our implementation
    (or lack thereof) of log_daemon_msg and log_progress_msg differs
    from Debian's implementation of the same (Ubuntu #19691)
  - Kept ubuntu-auxsrc.patch: some auxilliary sources (undocumented in 
    previous changelogs)
  - Set default workgroup to MSHOME

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr )
299
299
{
300
300
        TDB_DATA kbuf, dbuf;
301
 
        char *buffer, *tmpbuf;
 
301
        char *buffer;
302
302
        int i = 0;
303
303
        uint32 len, buflen;
304
304
        BOOL ret = True;
327
327
                len += tdb_pack( buffer+len, buflen-len, "f", regsubkey_ctr_specific_key(ctr, i) );
328
328
                if ( len > buflen ) {
329
329
                        /* allocate some extra space */
330
 
                        if ((tmpbuf = SMB_REALLOC( buffer, len*2 )) == NULL) {
 
330
                        if ((buffer = SMB_REALLOC( buffer, len*2 )) == NULL) {
331
331
                                DEBUG(0,("regdb_store_keys: Failed to realloc memory of size [%d]\n", len*2));
332
332
                                ret = False;
333
333
                                goto done;
334
334
                        }
335
 
                        buffer = tmpbuf;
336
335
                        buflen = len*2;
337
336
                                        
338
337
                        len = tdb_pack( buffer+len, buflen-len, "f", regsubkey_ctr_specific_key(ctr, i) );
526
525
        int             len = 0;
527
526
        int             i;
528
527
        REGISTRY_VALUE  *val;
529
 
        int             num_values = regval_ctr_numvals( values );
 
528
        int             num_values;
530
529
 
531
530
        if ( !values )
532
531
                return 0;
533
532
 
 
533
        num_values = regval_ctr_numvals( values );
 
534
 
534
535
        /* pack the number of values first */
535
536
        
536
537
        len += tdb_pack( buf+len, buflen-len, "d", num_values );