import HEAD into svn+ssh://svn.samba.org/home/svn/samba/trunk
[metze/old/v3-2-winbind-ndr.git] / packaging / Debian / debian / patches / smbstatus-locking.patch
1 diff -uNr samba-2.999+3.0.alpha21.orig/source/utils/status.c samba-2.999+3.0.alpha21/source/utils/status.c
2 --- samba-2.999+3.0.alpha21.orig/source/utils/status.c  2002-11-26 20:54:22.000000000 -0600
3 +++ samba-2.999+3.0.alpha21/source/utils/status.c       2002-12-16 23:37:14.000000000 -0600
4 @@ -630,6 +630,16 @@
5         if (!shares_only) {
6                 int ret;
7  
8 +               tdb = tdb_open_log(lock_path("locking.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
9 +
10 +               if (!tdb) {
11 +                       d_printf("%s not initialised\n", lock_path("locking.tdb"));
12 +                       d_printf("This is normal if an SMB client has never connected to your server.\n");
13 +                       exit(0);
14 +               } else {
15 +                       tdb_close(tdb);
16 +               }
17 +
18                 if (!locking_init(1)) {
19                         d_printf("Can't initialise locking module - exiting\n");
20                         exit(1);