update Sat Jun 19 12:37:00 PDT 2010
[pkgsrc.git] / net / samba / patches / patch-bh
1 $NetBSD: patch-bh,v 1.3 2007/10/28 07:28:48 taca Exp $
2
3 --- registry/reg_db.c.orig      2007-03-01 13:55:05.000000000 +0900
4 +++ registry/reg_db.c
5 @@ -234,12 +234,12 @@ BOOL regdb_init( void )
6         if ( tdb_reg )
7                 return True;
8  
9 -       if ( !(tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )
10 +       if ( !(tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )
11         {
12 -               tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
13 +               tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
14                 if ( !tdb_reg ) {
15                         DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n",
16 -                               lock_path("registry.tdb"), strerror(errno) ));
17 +                               state_path("registry.tdb"), strerror(errno) ));
18                         return False;
19                 }
20                 
21 @@ -281,11 +281,11 @@ WERROR regdb_open( void )
22         
23         become_root();
24  
25 -       tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
26 +       tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
27         if ( !tdb_reg ) {
28                 result = ntstatus_to_werror( map_nt_error_from_unix( errno ) );
29                 DEBUG(0,("regdb_open: Failed to open %s! (%s)\n", 
30 -                       lock_path("registry.tdb"), strerror(errno) ));
31 +                       state_path("registry.tdb"), strerror(errno) ));
32         }
33  
34         unbecome_root();