Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/libsmb/smb_share_modes.c

    r414 r740  
    2626
    2727#include "includes.h"
     28
    2829#include "smb_share_modes.h"
     30
    2931
    3032/* Database context handle. */
     
    6870
    6971        smb_db->smb_tdb = tdb_open(db_path,
    70                                 0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST,
     72                                0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST,
    7173                                O_RDWR|O_CREAT,
    7274                                0644);
     
    156158
    157159static void create_share_mode_entry(struct share_mode_entry *out,
    158                                 const struct smb_share_mode_entry *in)
     160                                const struct smb_share_mode_entry *in,
     161                                uint32_t name_hash)
    159162{
    160163        memset(out, '\0', sizeof(struct share_mode_entry));
     
    171174        out->uid = (uint32)geteuid();
    172175        out->flags = 0;
     176
    173177}
    174178
     
    256260        }
    257261
    258         *p_delete_on_close = ld->u.s.delete_on_close;
     262        *p_delete_on_close = ld->u.s.;
    259263        *pp_list = list;
    260264        free(db_data.dptr);
    261265        return list_num;
     266
     267
     268
     269
     270
     271
     272
     273
     274
     275
     276
     277
     278
     279
     280
     281
     282
     283
     284
     285
     286
     287
     288
     289
     290
    262291}
    263292
     
    282311        uint8 *new_data_p = NULL;
    283312        size_t new_data_size = 0;
     313
     314
     315
     316
     317
     318
    284319
    285320        db_data = tdb_fetch(db_ctx->smb_tdb, locking_key);
     
    297332                memset(ld, '\0', sizeof(struct locking_data));
    298333                ld->u.s.num_share_mode_entries = 1;
    299                 ld->u.s.delete_on_close = 0;
    300                 ld->u.s.delete_token_size = 0;
     334                ld->u.s.num_delete_token_entries = 0;
    301335                shares = (struct share_mode_entry *)(db_data.dptr + sizeof(struct locking_data));
    302                 create_share_mode_entry(shares, new_entry);
     336                create_share_mode_entry(shares, new_entry);
    303337
    304338                memcpy(db_data.dptr + sizeof(struct locking_data) + sizeof(struct share_mode_entry),
     
    339373                        (orig_num_share_modes * sizeof(struct share_mode_entry)));
    340374
    341         create_share_mode_entry(shares, new_entry);
     375        create_share_mode_entry(shares, new_entry);
    342376
    343377        ld = (struct locking_data *)new_data_p;
    344378        ld->u.s.num_share_mode_entries++;
    345379
    346         /* Append the original delete_token and filenames. */
     380        /* Append the original delete_token and filenames. */
    347381        memcpy(new_data_p + sizeof(struct locking_data) + (ld->u.s.num_share_mode_entries * sizeof(struct share_mode_entry)),
    348382                db_data.dptr + sizeof(struct locking_data) + (orig_num_share_modes * sizeof(struct share_mode_entry)),
     
    461495        }
    462496
    463         /* Copy any delete token plus the terminating filenames. */
     497        /* Copy any delete token plus the terminating filenames. */
    464498        remaining_ptr = db_data.dptr + sizeof(struct locking_data) + (orig_num_share_modes * sizeof(struct share_mode_entry));
    465499        remaining_size = db_data.dsize - (remaining_ptr - db_data.dptr);
     
    522556
    523557                if (share_mode_entry_equal(set_entry, share)) {
    524                         create_share_mode_entry(share, new_entry);
     558                        create_share_mode_entry(share, new_entry);
    525559                        found_entry = 1;
    526560                        break;
Note: See TracChangeset for help on using the changeset viewer.