Ignore:
Timestamp:
May 13, 2014, 11:39:04 AM (12 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update trunk to 3.6.23

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/lib/serverid.c

    r751 r862  
    3535};
    3636
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
    3749bool serverid_parent_init(TALLOC_CTX *mem_ctx)
    3850{
    39         struct tdb_wrap *db;
    40 
    4151        /*
    4252         * Open the tdb in the parent process (smbd) so that our
     
    4555         */
    4656
    47         db = tdb_wrap_open(mem_ctx, lock_path("serverid.tdb"),
    48                            0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, O_RDWR|O_CREAT,
    49                            0644);
    50         if (db == NULL) {
     57        if (serverid_init(mem_ctx, false) == NULL) {
    5158                DEBUG(1, ("could not open serverid.tdb: %s\n",
    5259                          strerror(errno)));
    5360                return false;
    5461        }
     62
    5563        return true;
    5664}
    5765
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
    5877static struct db_context *serverid_db(void)
    5978{
    60         static struct db_context *db;
    61 
    62         if (db != NULL) {
    63                 return db;
    64         }
    65         db = db_open(NULL, lock_path("serverid.tdb"), 0,
    66                      TDB_DEFAULT|TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, O_RDWR|O_CREAT, 0644);
    67         return db;
     79        if (db_ptr != NULL) {
     80                return db_ptr;
     81        }
     82
     83        return serverid_init(NULL, false);
    6884}
    6985
Note: See TracChangeset for help on using the changeset viewer.