All: Copyright updates - THIS WILL BE ROLLED BACK to 1997 if Andrew requests !
authorJeremy Allison <jra@samba.org>
Fri, 23 Jan 1998 08:30:30 +0000 (08:30 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 23 Jan 1998 08:30:30 +0000 (08:30 +0000)
charcnv.c: Russian language updates.
chgpasswd.c: Fixed change password from NT.
ipc.c: Warning fixes, fixed change password from NT.
nmbd.c: Allowed compile with MEM_MAN and SIGUSR1.
nmbd_browsesync.c: Fix for source nbt type.
nmbd_packets.c: Fix for source nbt type.
print_svid.c: lp output processing fix.
printing.c: lprng fix.
reply.c, server.c, util.c : oplock deadlock bugfix.
smbdes.c: Fixed change password from NT.
smbpass.c: Fixed change password from NT.
make_printerdef.c: Fixed warning messages from gcc with assignment in if.
This is the merge of what is in the main branch
to the 1.9.18 branch to get ready for 1.9.18p2.
Note that if Andrew requests we will roll back
the (C) changes.
Jeremy.

100 files changed:
source/cgi.c
source/client/client.c
source/client/clientutil.c
source/client/clitar.c
source/client/ntclient.c
source/client/smbmnt.c
source/client/smbmount.c
source/client/smbumount.c
source/include/byteorder.h
source/include/charset.h
source/include/includes.h
source/include/kanji.h
source/include/nameserv.h
source/include/proto.h
source/include/smb.h
source/include/trans2.h
source/lib/charcnv.c
source/lib/charset.c
source/lib/fault.c
source/lib/getsmbpass.c
source/lib/interface.c
source/lib/kanji.c
source/lib/md4.c
source/lib/replace.c
source/lib/system.c
source/lib/time.c
source/lib/ufc.c
source/lib/username.c
source/lib/util.c
source/libsmb/clientgen.c
source/libsmb/credentials.c
source/libsmb/namequery.c
source/libsmb/nmblib.c
source/libsmb/smbdes.c
source/libsmb/smbencrypt.c
source/libsmb/smberr.c
source/locking/locking.c
source/locking/locking_shm.c
source/locking/locking_slow.c
source/locking/shmem.c
source/locking/shmem_sysv.c
source/nameconf.c
source/nmbd/asyncdns.c
source/nmbd/nmbd.c
source/nmbd/nmbd_become_dmb.c
source/nmbd/nmbd_become_lmb.c
source/nmbd/nmbd_browserdb.c
source/nmbd/nmbd_browsesync.c
source/nmbd/nmbd_elections.c
source/nmbd/nmbd_incomingdgrams.c
source/nmbd/nmbd_incomingrequests.c
source/nmbd/nmbd_lmhosts.c
source/nmbd/nmbd_logonnames.c
source/nmbd/nmbd_mynames.c
source/nmbd/nmbd_namelistdb.c
source/nmbd/nmbd_namequery.c
source/nmbd/nmbd_nameregister.c
source/nmbd/nmbd_namerelease.c
source/nmbd/nmbd_nodestatus.c
source/nmbd/nmbd_packets.c
source/nmbd/nmbd_processlogon.c
source/nmbd/nmbd_responserecordsdb.c
source/nmbd/nmbd_sendannounce.c
source/nmbd/nmbd_serverlistdb.c
source/nmbd/nmbd_subnetdb.c
source/nmbd/nmbd_winsproxy.c
source/nmbd/nmbd_winsserver.c
source/nmbd/nmbd_workgroupdb.c
source/param/loadparm.c
source/param/params.c
source/passdb/smbpass.c
source/printing/pcap.c
source/printing/print_svid.c
source/printing/printing.c
source/smbd/chgpasswd.c
source/smbd/dir.c
source/smbd/ipc.c
source/smbd/mangle.c
source/smbd/message.c
source/smbd/password.c
source/smbd/pipes.c
source/smbd/predict.c
source/smbd/quotas.c
source/smbd/reply.c
source/smbd/server.c
source/smbd/smbrun.c
source/smbd/trans2.c
source/smbd/uid.c
source/smbd/vt_mode.c
source/utils/make_printerdef.c
source/utils/make_smbcodepage.c
source/utils/nmblookup.c
source/utils/smbpasswd.c
source/utils/status.c
source/utils/testparm.c
source/utils/testprns.c
source/utils/torture.c
source/web/cgi.c
source/wsmbconf.c
source/wsmbstatus.c

index e697f5537a3f1398938785a21f8bcc9277329e0d..ae60d72b7b7501751078d340bf2d285d9981ca75 100644 (file)
@@ -1,6 +1,6 @@
 /* 
    some simple CGI helper routines
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 49982760e1d03f774fbb415a50e35801b0193dec..d5b6f4bdcb8b1d692fa59662798182821d7c5d2b 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB client
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e3786d602970a981275ed97c8bbad8a689d50b83..b945edf87f2591cc66ba6844079fca3c421439a8 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB client
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 05cb13656aa4869694c54e2c075c2f582f936834..6763d221cea68e1f16afd23e0206aab2a9910703 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Tar Extensions
-   Copyright (C) Ricky Poulten 1995-1997
+   Copyright (C) Ricky Poulten 1995-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 7e360981c025f98bc8e047d2be95473d9365a9ca..54ab49e3a65ea6247889a8bbb18b9c8f37a9f830 100644 (file)
@@ -3,7 +3,7 @@
    Version 1.9.
    NT Domain Authentication SMB / MSRPC client
    Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1996-1997
+   Copyright (C) Luke Kenneth Casson Leighton 1996-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2891ea709cdb6a1d504b393e1df3cf809a42f544..9f8eea1cac5d5ab723b74cd30f545b6b364b2a16 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  smbmount.c
  *
- *  Copyright (C) 1995, 1996 by Paal-Kr. Engstad and Volker Lendecke
+ *  Copyright (C) 1995-1998 by Paal-Kr. Engstad and Volker Lendecke
  *
  */
 
index abf00e2b785a79afcbfa98f43e22a6bb578c3227..847c4b1f3dde3e9cafef9af1a410c5158480db69 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB client
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 304da24ff6cf28078830f0f108aeead33755cd6a..8d76aefc5ff215a17074570939938b0e34a7e5a9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  smbumount.c
  *
- *  Copyright (C) 1995 by Volker Lendecke
+ *  Copyright (C) 1995-1998 by Volker Lendecke
  *
  */
 
index 4d972a5cac2fa6bffdc22565fbddda607473ff4c..3371fd24cbc6d29ea2f26fe4c21439a94affe04c 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB Byte handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index fb184897c07a7bb1c4cd0c443b003d84f4cea57b..b6f79c03dde7258e50784f0f9c291104d1e2fcbf 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Character set handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2d2ff63f8882c83359e17ecb2996dbee699cca1a..f021fa952e7b139ec1bc4be4ceefd1bc3d8cf375 100644 (file)
@@ -4,7 +4,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Machine customisation and include handling
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5e8173ee14ca72d561f942e542359b5a580a2a8a..101b98cfa344563e7ccaf4034cdbd244f434a9a6 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Kanji Extensions
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 98a6cb330ac215745466faa79e9c33bbf1ed0c4d..7faad9aff4db58cf749b9bd80de93e67d82bbe21 100644 (file)
@@ -4,7 +4,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios header - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a8471d0c2df8dadbd6fb36fcdc09a8e988c4e956..3d478b92468ee41a8adee550de3fb33d02daed10 100644 (file)
@@ -45,6 +45,9 @@ void add_char_string(char *s);
 BOOL chat_with_program(char *passwordprogram,char *name,char *chatsequence);
 BOOL chgpasswd(char *name,char *oldpass,char *newpass);
 BOOL chgpasswd(char *name,char *oldpass,char *newpass);
+BOOL check_lanman_password(char *user, unsigned char *pass1, 
+                           unsigned char *pass2, struct smb_passwd **psmbpw);
+BOOL change_lanman_password(struct smb_passwd *smbpw, char *pass1, char *pass2);
 
 /*The following definitions come from  client.c  */
 
@@ -1218,7 +1221,7 @@ int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize);
 BOOL check_name(char *name,int cnum);
 void sync_file(int fnum);
 void close_file(int fnum, BOOL normal_close);
-BOOL check_file_sharing(int cnum,char *fname);
+BOOL check_file_sharing(int cnum,char *fname, BOOL rename_op);
 int check_share_mode( share_mode_entry *share, int deny_mode, char *fname,
                       BOOL fcbopen, int *flags);
 void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,
@@ -1268,6 +1271,7 @@ struct shmem_ops *sysv_shm_open(int ronly);
 
 void E_P16(unsigned char *p14,unsigned char *p16);
 void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24);
+void D_P16(unsigned char *p14, unsigned char *in, unsigned char *out);
 void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key);
 void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key);
 
@@ -1439,7 +1443,7 @@ int read_smb_length(int fd,char *inbuf,int timeout);
 BOOL receive_smb(int fd,char *buffer, int timeout);
 BOOL client_receive_smb(int fd,char *buffer, int timeout);
 BOOL receive_local_message(int fd, char *buffer, int buffer_len, int timeout);
-BOOL push_local_message(char *buf, int msg_len);
+BOOL push_smb_message(char *buf, int msg_len);
 BOOL receive_message_or_smb(int smbfd, int oplock_fd, 
                            char *buffer, int buffer_len, 
                            int timeout, BOOL *got_smb);
index e6c0565b056955356fa46b62ab9faf6c6e7193cf..9c55e3f8be41aab53ffdcfe13e5423a583f5eb68 100644 (file)
@@ -2,10 +2,10 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB parameters and setup
-   Copyright (C) Andrew Tridgell 1992-1997
-   Copyright (C) John H Terpstra 1996-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1996-1997
-   Copyright (C) Paul Ashton 1997
+   Copyright (C) Andrew Tridgell 1992-1998
+   Copyright (C) John H Terpstra 1996-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1996-1998
+   Copyright (C) Paul Ashton 1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5218604e0e1aaacf0b84a39e1df9083afc58de69..62b6a1a9bf71a50a24e1b328e213cc1dcefb51cc 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB transaction2 handling
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Jeremy Allison 1994-1998
 
    Extensively modified by Andrew Tridgell, 1995
 
index e1a7ac01db522c0727cbabca599fbfab95611a11..f02fcb2f927d521a70575a70ae427e4610ef295b 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Character set conversion Extensions
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -98,6 +98,62 @@ update_map("\257\275\261\245\346\206\352\251\263\210\361\344\363\242\266\230");
 update_map("\274\253\277\276");
 }
 
+/* Init for russian language (iso8859-5) */
+
+/* Added by Max Khon <max@iclub.nsu.ru> */
+
+static void init_iso8859_5()
+{
+  int i;
+  if (!mapsinited) initmaps();
+
+  /* Do not map undefined characters to some accidental code */
+  for (i = 128; i < 256; i++) 
+  {
+     unix2dos[i] = CTRLZ;
+     dos2unix[i] = CTRLZ;
+  }
+
+/* MSDOS Code Page 866 -> ISO8859-5 */
+update_map("\200\260\201\261\202\262\203\263\204\264\205\265\206\266\207\267");
+update_map("\210\270\211\271\212\272\213\273\214\274\215\275\216\276\217\277");
+update_map("\220\300\221\301\222\302\223\303\224\304\225\305\226\306\227\307");
+update_map("\230\310\231\311\232\312\233\313\234\314\235\315\236\316\237\317");
+update_map("\240\320\241\321\242\322\243\323\244\324\245\325\246\326\247\327");
+update_map("\250\330\251\331\252\332\253\333\254\334\255\335\256\336\257\337");
+update_map("\340\340\341\341\342\342\343\343\344\344\345\345\346\346\347\347");
+update_map("\350\350\351\351\352\352\353\353\354\354\355\355\356\356\357\357");
+update_map("\360\241\361\361\362\244\363\364\364\247\365\367\366\256\367\376");
+update_map("\374\360\377\240");
+}
+
+/* Init for russian language (koi8) */
+
+static void init_koi8_r()
+{
+  if (!mapsinited) initmaps();
+
+  /* There aren't undefined characters between 128 and 255 */
+
+/* MSDOS Code Page 866 -> KOI8-R */
+update_map("\200\304\201\263\202\332\203\277\204\300\205\331\206\303\207\264");
+update_map("\210\302\211\301\212\305\213\337\214\334\215\333\216\335\217\336");
+update_map("\220\260\221\261\222\262\223\364\224\376\225\371\226\373\227\367");
+update_map("\230\363\231\362\232\377\233\365\234\370\235\375\236\372\237\366");
+update_map("\240\315\241\272\242\325\243\361\244\326\245\311\246\270\247\267");
+update_map("\250\273\251\324\252\323\253\310\254\276\255\275\256\274\257\306");
+update_map("\260\307\261\314\262\265\263\360\264\266\265\271\266\321\267\322");
+update_map("\270\313\271\317\272\320\273\312\274\330\275\327\276\316\277\374");
+update_map("\300\356\301\240\302\241\303\346\304\244\305\245\306\344\307\243");
+update_map("\310\345\311\250\312\251\313\252\314\253\315\254\316\255\317\256");
+update_map("\320\257\321\357\322\340\323\341\324\342\325\343\326\246\327\242");
+update_map("\330\354\331\353\332\247\333\350\334\355\335\351\336\347\337\352");
+update_map("\340\236\341\200\342\201\343\226\344\204\345\205\346\224\347\203");
+update_map("\350\225\351\210\352\211\353\212\354\213\355\214\356\215\357\216");
+update_map("\360\217\361\237\362\220\363\221\364\222\365\223\366\206\367\202");
+update_map("\370\234\371\233\372\207\373\230\374\235\375\231\376\227\377\232");
+}
+
 /*
  * Convert unix to dos
  */
@@ -156,6 +212,10 @@ void interpret_character_set(char *str)
         init_iso8859_1();
     } else if (strequal (str, "iso8859-2")) {
         init_iso8859_2();
+    } else if (strequal (str, "iso8859-5")) {
+        init_iso8859_5();
+    } else if (strequal (str, "koi8-r")) {
+        init_koi8_r();
     } else {
         DEBUG(0,("unrecognized character set\n"));
     }
index 95b3d01627e8a73255d81e79ada1fc2505ac4346..74e3a8f358b32232da9a7577c1226d68e21c7fa3 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Character set handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 61715a4f225c030ead9155e0a9939a44d5b01d97..e3299c50dbd2ea36c0198366b46eb1c677466ee4 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Critical Fault handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e8cb683d0b147006c94b88bc20cab1d8493c9eb8..3996c452696166e3db7129d5e555db6f6c72a44b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992-1998 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
index ff7c6ee816f15f00375683b7c89cbe10933198c8..9687e1336c65b59b233d5820f95b7a136dbb1b06 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    multiple interface handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index f6aace84116352d56004d09ca18201dce811fef0..2027a344c260f9fe0fb2b4b578ad6951a7c20b1e 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Kanji Extensions
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1c9c2e6ecd596b82b665e82b648088cfe11f0347..812566dbd38b5d51c272d44b2a6e4133776ff55f 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    a implementation of MD4 designed for use in the SMB authentication protocol
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b27909db03495e4d39248138a1fc09181374d122..a08d3d240e4897a5a8c3df03133668a5f4d9d375 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    replacement routines for broken systems
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1486600339aec32b1e2f19357dcff30e86678a43..f5fbae53abebdccaa9b06bb938c11f9ef4069a84 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Samba system utilities
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5fc6595b6f14251456e832b9fe26434c14911948..5e6d01215f78eac2948a9c8378195443ab9c17b7 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    time handling functions
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3330111c2f53b300780a51ac8cae222f2d25c696..17fd970c5b8f27cb903720ef862e37fe2c2fe5ae 100644 (file)
@@ -21,7 +21,7 @@
 /*
  * UFC-crypt: ultra fast crypt(3) implementation
  *
- * Copyright (C) 1991-1997, Free Software Foundation, Inc.
+ * Copyright (C) 1991-1998, Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
index a7241d309f44c963647882ed11b1b1637055010e..751b0e53363ee23bb1d6c35f8139c564812cc539 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Username handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 403ebb73eb857f373854fe730cfb1b6e4adc3797..1b9ed00c31ae95a273348080a42af0d48da59516 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Samba utility functions
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -2485,29 +2485,31 @@ BOOL receive_local_message(int fd, char *buffer, int buffer_len, int timeout)
 }
 
 /****************************************************************************
- structure to hold a linked list of local udp messages.
+ structure to hold a linked list of local messages.
  for processing.
 ****************************************************************************/
 
-typedef struct _udp_message_list {
-   struct _udp_message_list *msg_next;
+typedef struct _message_list {
+   struct _message_list *msg_next;
    char *msg_buf;
    int msg_len;
-} udp_message_list;
+} pending_message_list;
 
-static udp_message_list *udp_msg_head = NULL;
+static pending_message_list *smb_msg_head = NULL;
 
 /****************************************************************************
- Function to push a linked list of local udp messages ready
+ Function to push a linked list of local messages ready
  for processing.
 ****************************************************************************/
-BOOL push_local_message(char *buf, int msg_len)
+
+static BOOL push_local_message(pending_message_list **pml, char *buf, int msg_len)
 {
-  udp_message_list *msg = (udp_message_list *)malloc(sizeof(udp_message_list));
+  pending_message_list *msg = (pending_message_list *)
+                               malloc(sizeof(pending_message_list));
 
   if(msg == NULL)
   {
-    DEBUG(0,("push_local_message: malloc fail (1)\n"));
+    DEBUG(0,("push_message: malloc fail (1)\n"));
     return False;
   }
 
@@ -2522,12 +2524,22 @@ BOOL push_local_message(char *buf, int msg_len)
   memcpy(msg->msg_buf, buf, msg_len);
   msg->msg_len = msg_len;
 
-  msg->msg_next = udp_msg_head;
-  udp_msg_head = msg;
+  msg->msg_next = *pml;
+  *pml = msg;
 
   return True;
 }
 
+/****************************************************************************
+ Function to push a linked list of local smb messages ready
+ for processing.
+****************************************************************************/
+
+BOOL push_smb_message(char *buf, int msg_len)
+{
+  return push_local_message(&smb_msg_head, buf, msg_len);
+}
+
 /****************************************************************************
   Do a select on an two fd's - with timeout. 
 
@@ -2535,6 +2547,10 @@ BOOL push_local_message(char *buf, int msg_len)
   queue (this can only happen during oplock break
   processing) return this first.
 
+  If a pending smb message has been pushed onto the
+  queue (this can only happen during oplock break
+  processing) return this next.
+
   If the first smbfd is ready then read an smb from it.
   if the second (loopback UDP) fd is ready then read a message
   from it and setup the buffer header to identify the length
@@ -2555,19 +2571,22 @@ BOOL receive_message_or_smb(int smbfd, int oplock_fd,
   *got_smb = False;
 
   /*
-   * Check to see if we already have a message on the udp queue.
+   * Check to see if we already have a message on the smb queue.
    * If so - copy and return it.
    */
-
-  if(udp_msg_head)
+  
+  if(smb_msg_head)
   {
-    udp_message_list *msg = udp_msg_head;
+    pending_message_list *msg = smb_msg_head;
     memcpy(buffer, msg->msg_buf, MIN(buffer_len, msg->msg_len));
-    udp_msg_head = msg->msg_next;
-
+    smb_msg_head = msg->msg_next;
+  
     /* Free the message we just copied. */
     free((char *)msg->msg_buf);
     free((char *)msg);
+    *got_smb = True;
+
+    DEBUG(5,("receive_message_or_smb: returning queued smb message.\n"));
     return True;
   }
 
@@ -3731,6 +3750,7 @@ char *automount_server(char *user_name)
                        home_server_len = sizeof(pstring);
                }
                strncpy(server_name, nis_result, home_server_len);
+                server_name[home_server_len] = '\0';
        }
 #else
        /* use the local machine name instead of the auto-map server */
index 4185c19feac9fc4bfcbe10797bf34ccffd7b2e24..319a77beb65e90e421937c092f19214877ad77c7 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB client generic functions
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b06ca6ffc6dab877487b7e826187bb23e83e7973..9f5c70e5e4a40086bdc58a9e5bddbf29a637898d 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    code to manipulate domain credentials
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 9915ee92a850dbb06dbbccf9967e73f35000d57c..207f064670cdb19e84d9ae8eb26d693c0db347c2 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    name query routines
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 0335f01833b338add761a955ba660eeab0bcb505..1400b88434247cd8b6a4b6f80f26e24e546c7332 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios library routines
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e4f8280f9bc0ceb91e2dfb00ece62f4cc01521c5..c345d051bd8af24c12b2a3cf22c2d95813fca2fe 100644 (file)
@@ -5,7 +5,7 @@
    a partial implementation of DES designed for use in the 
    SMB authentication protocol
 
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -178,7 +178,7 @@ static void xor(char *out, char *in1, char *in2, int n)
                out[i] = in1[i] ^ in2[i];
 }
 
-static void dohash(char *out, char *in, char *key)
+static void dohash(char *out, char *in, char *key, int forw)
 {
        int i, j, k;
        char pk1[56];
@@ -222,7 +222,7 @@ static void dohash(char *out, char *in, char *key)
 
                permute(er, r, perm4, 48);
 
-               xor(erk, er, ki[i], 48);
+               xor(erk, er, ki[forw ? i : 15 - i], 48);
 
                for (j=0;j<8;j++)
                        for (k=0;k<6;k++)
@@ -275,7 +275,7 @@ static void str_to_key(unsigned char *str,unsigned char *key)
 }
 
 
-static void smbhash(unsigned char *out, unsigned char *in, unsigned char *key)
+static void smbhash(unsigned char *out, unsigned char *in, unsigned char *key, int forw)
 {
        int i;
        char outb[64];
@@ -291,7 +291,7 @@ static void smbhash(unsigned char *out, unsigned char *in, unsigned char *key)
                outb[i] = 0;
        }
 
-       dohash(outb, inb, keyb);
+       dohash(outb, inb, keyb, forw);
 
        for (i=0;i<8;i++) {
                out[i] = 0;
@@ -306,23 +306,29 @@ static void smbhash(unsigned char *out, unsigned char *in, unsigned char *key)
 void E_P16(unsigned char *p14,unsigned char *p16)
 {
        unsigned char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
-       smbhash(p16, sp8, p14);
-       smbhash(p16+8, sp8, p14+7);
+       smbhash(p16, sp8, p14, 1);
+       smbhash(p16+8, sp8, p14+7, 1);
 }
 
 void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24)
 {
-       smbhash(p24, c8, p21);
-       smbhash(p24+8, c8, p21+7);
-       smbhash(p24+16, c8, p21+14);
+       smbhash(p24, c8, p21, 1);
+       smbhash(p24+8, c8, p21+7, 1);
+       smbhash(p24+16, c8, p21+14, 1);
+}
+
+void D_P16(unsigned char *p14, unsigned char *in, unsigned char *out)
+{
+       smbhash(out, in, p14, 0);
+        smbhash(out+8, in+8, p14+7, 0);
 }
 
 void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key)
 {
        unsigned char buf[8];
 
-       smbhash(buf, in, key);
-       smbhash(out, buf, key+9);
+       smbhash(buf, in, key, 1);
+       smbhash(out, buf, key+9, 1);
 }
 
 void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key)
@@ -330,8 +336,8 @@ void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key)
        unsigned char buf[8];
        static unsigned char key2[8];
 
-       smbhash(buf, in, key);
+       smbhash(buf, in, key, 1);
        key2[0] = key[7];
-       smbhash(out, buf, key2);
+       smbhash(out, buf, key2, 1);
 }
 
index 38d414cf23d5485992abc7b488e3fabd61f7978c..052dae06f108c7924eb85593bda28325b6651e4a 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB parameters and setup
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    Modified by Jeremy Allison 1995.
    
    This program is free software; you can redistribute it and/or modify
index 5149568c04587282e2e23c5812ea33ddb3327a0e..e8c4544394e4ed9e8eb590b440a514566f7dec50 100644 (file)
@@ -1,7 +1,7 @@
 /* 
    Unix SMB/Netbios implementation.
    Version 1.9.
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index d654d038c812f819a14f4ba6c80509d890dfaaa7..189ac0bcfe70a1646cb8bacd7971d6ea3baff252 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Locking functions
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2e3278d3ddd70b956691e759b6e4f82477a36b80..e3c65ce286312650635f61d062f4c21f901c00ab 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    shared memory locking implementation
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 935ed09f60d3b01ffaac2a5eae7cf6cca268a2e6..de2bb1701c1ed41a6cc7dd55a4e28956c3fc29e4 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    slow (lockfile) locking implementation
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 864f7c298b6893adc449655e101945c210551c6a..63d7ebd3d41db94966f1c0ecbf6f5975fcc38f0f 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Shared memory functions
-   Copyright (C) Erik Devriendt 1996-1997
+   Copyright (C) Erik Devriendt 1996-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6b5d9b1ea6841b55d5672e76474e8bcd00c69be0..e415c2ebc5f750e184ee4b3e68fba4edb06ace52 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Shared memory functions - SYSV IPC implementation
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 190687806110471420303e8249e9df9db7c3912b..331ec13a95e8d14c1a62b8af456ca840fabb2e92 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) David Chappell 1996-1997
+   Copyright (C) David Chappell 1996-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e0d262f72ca4a681c5f37f2dcd54dc3de378b098..ee3fdfcd17ca5b6de6848188ad13ea61b5b968ae 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Unix SMB/Netbios implementation.
    a async DNS handler
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 744942ba464cf11045cd8260eac58210d5c59fb9..b6e4244cd01815a58259bda196fc4c99baba4ba4 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -580,6 +580,9 @@ int main(int argc,char *argv[])
   /* Setup the signals that allow the debug log level
      to by dynamically changed. */
 
+  /* If we are using the malloc debug code we can't use
+     SIGUSR1 and SIGUSR2 to do debug level changes. */
+#ifndef MEM_MAN
 #if defined(SIGUSR1)
   signal( SIGUSR1, SIGNAL_CAST sig_usr1 );
 #endif /* SIGUSR1 */
@@ -587,6 +590,7 @@ int main(int argc,char *argv[])
 #if defined(SIGUSR2)
   signal( SIGUSR2, SIGNAL_CAST sig_usr2 );
 #endif /* SIGUSR2 */
+#endif /* MEM_MAN */
 
   while((opt = getopt(argc, argv, "as:T:I:C:bAi:B:N:Rn:l:d:Dp:hSH:G:f:")) != EOF)
     {
index d8788b7314789900281e02fa139d0c99a9286ce3..52065758bcdbdae3b1cf56d96df93b4fab758a07 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-1997
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 7bfd558003a1bd06e817b6275ae96e999d25ed13..2420b2ec4b73187982a2c08223b1a09bc27e4589 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b2db7443707916e5468b43bf941be2d4fa27e3f3..ee3e4e4bde151bc506870399818bcb00d98d3048 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e4231e6017575afb93e2495d3d6aecc025b1d3dc..94bdecb8fcb741f299312176ec7b383e35c1d994 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -252,7 +252,7 @@ Do not announce to ourselves.\n", work->work_group ));
 to %s for workgroup %s.\n", namestr(&work->dmb_name), work->work_group ));
 
   send_mailslot(True, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf),
-          myname, 0x0, work->dmb_name.name, 0x20, work->dmb_addr, FIRST_SUBNET->myip);
+          myname, 0x0, work->dmb_name.name, 0x0, work->dmb_addr, FIRST_SUBNET->myip);
 
 }
 
index 8081de8382d685b67db436644ce01c5021ab4d2a..fa1e5986a8a4f3d980e9ed5c38be64156b52650b 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b1de27f1817978e736ad71112d2372b4b1926997..46d988e89afecd023cd6f46715952cf9fa2bd3c7 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 73abdf005045f86b9323a93648eab2017f5e1575..57517c373450bfcb37982d1083b0b486c3ebcabc 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2dd1db81cd57ca522b5cc2a90a71ee712c92fdec..722c3681f55b4cdce592d5ecda9b7b9d1f6b08bc 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Jeremy Allison 1994-1998
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b2431ec0a765446dbd5e4f08bc688c6d649b4060..4128213f97cf8c999739b5b434613ec4d675a77f 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 660b5450699cfda73337aedc0a1263522bca3fe6..035d1e6d3f037ed1bfe005c898f468aeadd213e0 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index dfd8a80baa11578f3c1ec67eb3820c0b119ac72a..2237fc504d3386632513449968894ac66c654b28 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5d98935fec78f9a35f3ebfd799d58d76402594e7..bbd831cac8e11dd4c658e1299524180e19ba6e02 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3223159ace610c2c07ea11877d4b2d6737b1180d..a3e4208cdcd32c01f1fac4dc2f79afa202c44a03 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 8632dd765538b0572f0709d3a24d1fb2ea621751..b2f9b4787874ec427af2e92489b240cae9546537 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 267446c69dc46ca39ae0103ac0316280b76cb863..196c0f0ba7230358ed784b1792c78c4bbfb6918a 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 03bd3889fadeadb3e3ad190e046df3af98807e6a..9dad5ddaa990fb3d43719ff2fa30cd356a259a00 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1794,7 +1794,7 @@ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len,
   dgram->header.dgm_length = 0; /* Let build_dgram() handle this. */
   dgram->header.packet_offset = 0;
   
-  make_nmb_name(&dgram->source_name,srcname,0,scope);
+  make_nmb_name(&dgram->source_name,srcname,src_type,scope);
   make_nmb_name(&dgram->dest_name,dstname,dest_type,scope);
 
   ptr = &dgram->data[0];
index cd2fbfd0a56fd7d1caac869052b1374050ea73cf..64f66038e0300615482403ae892c04619670e839 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 031853271b8769bc517e91acc649cf91b414281a..a075284a4af3a4b2e20103ebb944c764dc0046a3 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios library routines
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e859ff6bb70cbdaffd41f01da8a0ef116622eb37..62e5f02d8c826a25b3ce03443b120a318cd27055 100644 (file)
@@ -2,12 +2,12 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
 
    SMB Version handling
-   Copyright (C) John H Terpstra 1995-1997
+   Copyright (C) John H Terpstra 1995-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6a6998f81dc8b431bf0e83d9a4b65a89727b215f..e94cb1da6e9d5d2fd56e9103fbfa692fd14c08dd 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 93aecc21f2936398c71fc529368e8a137d4ff642..5e18fe9cc0c730e75a662e52823fa4bfea1d2a71 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 36b9e7843ce508c6824a6978e5c7332782cad7cc..ded37ebf3082f61c7f5805b144cccc77b0485f1a 100644 (file)
@@ -3,7 +3,7 @@
    Version 1.9.
    NBT netbios routines and daemon - version 2
 
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Jeremy Allison 1994-1998
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4a631a79b713fd1e5f00908e4a3100c8b3806ca6..eb120e0918852722714a68272cc3167f211b27a9 100644 (file)
@@ -3,7 +3,7 @@
    Version 1.9.
    NBT netbios routines and daemon - version 2
 
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Jeremy Allison 1994-1998
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1b97b92721e034590814d59365b32ca2dbc6a8cc..b8345257474a059ff027860ed135ef392e435100 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT netbios routines and daemon - version 2
-   Copyright (C) Andrew Tridgell 1994-1997
-   Copyright (C) Luke Kenneth Casson Leighton 1994-199
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1994-1998
+   Copyright (C) Jeremy Allison 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 61a14c92492f3cab7d94e7bbb90dcdb965e00bcc..ac0f932faede4144fe9de2b82b1fca26e3b055db 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Parameter loading functions
-   Copyright (C) Karl Auer 1993,1997
+   Copyright (C) Karl Auer 1993-1998
 
    Largely re-written by Andrew Tridgell, September 1994
    
index a0a259c00707b6a5e44690b6807af928e1c10c6e..2a0a253f208d42b6a100b3fb08ad3fdb2aa143c9 100644 (file)
@@ -1,11 +1,11 @@
 /* -------------------------------------------------------------------------- **
  * Microsoft Network Services for Unix, AKA., Andrew Tridgell's SAMBA.
  *
- * This module Copyright (C) 1990, 1991, 1992, 1993, 1994 Karl Auer
+ * This module Copyright (C) 1990-1998 Karl Auer
  *
  * Rewritten almost completely by Christopher R. Hertel
  * at the University of Minnesota, September, 1997.
- * This module Copyright (C) 1997 by the University of Minnesota
+ * This module Copyright (C) 1997-1998 by the University of Minnesota
  * -------------------------------------------------------------------------- **
  *
  * This program is free software; you can redistribute it and/or modify
index 4109383fb4795ab3159f49a198e8a5cb36720541..ea386bfa9df0dd319dca8fdaba88fdbf211f8aa3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Unix SMB/Netbios implementation. Version 1.9. SMB parameters and setup
- * Copyright (C) Andrew Tridgell 1992-1997 Modified by Jeremy Allison 1995.
+ * Copyright (C) Andrew Tridgell 1992-1998 Modified by Jeremy Allison 1995.
  * 
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free
@@ -788,12 +788,15 @@ BOOL mod_smbpwd_entry(struct smb_passwd* pwd)
                return False;
        }
 
+        /* The following check is wrong - the NT hash is optional. */
+#if 0
        if (*p == '*' || *p == 'X')
        {
                fclose(fp);
                pw_file_unlock(lockfd);
                return False;
        }
+#endif
 
        /* whew.  entry is correctly formed. */
 
@@ -838,19 +841,20 @@ BOOL mod_smbpwd_entry(struct smb_passwd* pwd)
        {
                sprintf(&ascii_p16[i*2], "%02X", (uchar) pwd->smb_passwd[i]);
        }
+       /* Add on the NT md4 hash */
+       ascii_p16[32] = ':';
+       wr_len = 65;
        if (pwd->smb_nt_passwd != NULL)
        {
-               /* Add on the NT md4 hash */
-               ascii_p16[32] = ':';
                for (i = 0; i < 16; i++)
                {
                        sprintf(&ascii_p16[(i*2)+33], "%02X", (uchar) pwd->smb_nt_passwd[i]);
                }
-               wr_len = 65;
        }
        else    
        {
-               wr_len = 32;
+               /* No NT hash - write out an 'invalid' string. */
+               strcpy(&ascii_p16[33], "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
        }
 
 #ifdef DEBUG_PASSWORD
index bff81b8661dd3a39b54270fd17626046423cabe4..3698114a2f5153ed3b71898dc1e867112487692e 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    printcap parsing
-   Copyright (C) Karl Auer 1993-1997
+   Copyright (C) Karl Auer 1993-1998
 
    Re-working by Martin Kiff, 1994
    
index c1129ce88a58409a8c7a76adb688eb5300418f48..3340568b14d5ac5b863faa60a717a8a53f0d55c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Copyright (C) 1997 by Norm Jacobs, Colorado Springs, Colorado, USA
- * Copyright (C) 1997 by Sun Microsystem, Inc.
+ * Copyright (C) 1997-1998 by Norm Jacobs, Colorado Springs, Colorado, USA
+ * Copyright (C) 1997-1998 by Sun Microsystem, Inc.
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -60,7 +60,7 @@ static void populate_printers()
                        if (((tmp = strchr(buf, ' ')) == NULL) ||
                            ((tmp = strchr(++tmp, ' ')) == NULL))
                                continue;
-                       name = ++tmp;
+                       name = tmp++;
 
                        /* truncate the ": ..." */
                        if ((tmp = strchr(name, ':')) != NULL)
index 76b962606b77adf16c0508a22f20c42097cd00a5..71b89022e6e7e436167d97676865c59646d9fd49 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    printing routines
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -436,7 +436,12 @@ A long spool-path will just waste significant chars of the file name.
 
   buf->job = atoi(tok[LPRNG_JOBTOK]);
   buf->size = atoi(tok[LPRNG_TOTALTOK]);
-  buf->status = strequal(tok[LPRNG_RANKTOK],"active")?LPQ_PRINTING:LPQ_QUEUED;
+  if (strequal(tok[LPRNG_RANKTOK],"active"))
+    buf->status = LPQ_PRINTING;
+  else if (strequal(tok[LPRNG_RANKTOK],"hold"))
+    buf->status = LPQ_PAUSED;
+  else
+    buf->status = LPQ_QUEUED;
   /*  buf->time = time(NULL); */
   buf->time = LPRng_time(tok,LPRNG_TIMETOK);
 DEBUG(3,("Time reported for job %d is %s", buf->job, ctime(&buf->time)));
index 17401410cec14043130fa1318533399a427b820b..b516ec8ac8ee645305f821547cf70993ce0601a8 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Samba utility functions
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -398,3 +398,86 @@ BOOL chgpasswd(char *name,char *oldpass,char *newpass)
   return(False);
 }
 #endif
+
+/***********************************************************
+ Code to check the lanman hashed password.
+************************************************************/
+
+BOOL check_lanman_password(char *user, unsigned char *pass1, 
+                           unsigned char *pass2, struct smb_passwd **psmbpw)
+{
+  unsigned char unenc_new_pw[16];
+  unsigned char unenc_old_pw[16];
+  struct smb_passwd *smbpw;
+
+  *psmbpw = NULL;
+
+  become_root(0);
+  smbpw = get_smbpwd_entry(user, 0);
+  unbecome_root(0);
+
+  if(smbpw == NULL)
+  {
+    DEBUG(0,("check_lanman_password: get_smbpwd_entry returned NULL\n"));
+    return False;
+  }
+
+  if(smbpw->smb_passwd == NULL)
+  {
+    DEBUG(0,("check_lanman_password: no lanman password !\n"));
+    return False;
+  }
+
+  /* Get the new lanman hash. */
+  D_P16(smbpw->smb_passwd, pass2, unenc_new_pw);
+
+  /* Use this to get the old lanman hash. */
+  D_P16(unenc_new_pw, pass1, unenc_old_pw);
+
+  /* Check that the two old passwords match. */
+  if(memcmp(smbpw->smb_passwd, unenc_old_pw, 16))
+  {
+    DEBUG(0,("check_lanman_password: old password doens't match.\n"));
+    return False;
+  }
+
+  *psmbpw = smbpw;
+  return True;
+}
+
+/***********************************************************
+ Code to change the lanman hashed password.
+ It nulls out the NT hashed password as it will
+ no longer be valid.
+************************************************************/
+
+BOOL change_lanman_password(struct smb_passwd *smbpw, char *pass1, char *pass2)
+{
+  char unenc_new_pw[16];
+  BOOL ret;
+
+  if(smbpw == NULL)
+  { 
+    DEBUG(0,("change_lanman_password: get_smbpwd_entry returned NULL\n"));
+    return False;
+  }
+
+  if(smbpw->smb_passwd == NULL)
+  {
+    DEBUG(0,("change_lanman_password: no lanman password !\n"));
+    return False;
+  }
+
+  /* Get the new lanman hash. */
+  D_P16(smbpw->smb_passwd, pass2, unenc_new_pw);
+
+  smbpw->smb_passwd = unenc_new_pw;
+  smbpw->smb_nt_passwd = NULL; /* We lose the NT hash. Sorry. */
+
+  /* Now write it into the file. */
+  become_root(0);
+  ret = mod_smbpwd_entry(smbpw);
+  unbecome_root(0);
+    
+  return ret;
+}
index c12305499a5508d80561ba9a1224567f73701abf..d751653263286a25caab9efd47488a408fc3e7d0 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Directory handling routines
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index ee2aec8c220c8a7557ed7aa135eaf49d07041f3d..048dab8b3e449d002fb44cecf057187724d5d2a2 100644 (file)
@@ -2,10 +2,10 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Inter-process communication and named pipe handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
 
    SMB Version handling
-   Copyright (C) John H Terpstra 1995-1997
+   Copyright (C) John H Terpstra 1995-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1141,7 +1141,7 @@ static BOOL api_RNetServerEnum(int cnum, uint16 vuid, char *param, char *data,
   uint32 servertype = IVAL(p,4);
   char *p2;
   int data_len, fixed_len, string_len;
-  int f_len, s_len;
+  int f_len = 0, s_len = 0;
   struct srv_info_struct *servers=NULL;
   int counted=0,total=0;
   int i,missed;
@@ -1421,7 +1421,7 @@ static BOOL api_RNetShareEnum(int cnum,uint16 vuid, char *param,char *data,
   int total=0,counted=0;
   int i;
   int data_len, fixed_len, string_len;
-  int f_len, s_len;
+  int f_len = 0, s_len = 0;
  
   if (!prefix_ok(str1,"WrLeh")) return False;
   if (!check_share_info(uLevel,str2)) return False;
@@ -1532,8 +1532,8 @@ static BOOL api_SetUserPassword(int cnum,uint16 vuid, char *param,char *data,
 
   p = skip_string(p,1);
 
-  StrnCpy(pass1,p,16);
-  StrnCpy(pass2,p+16,16);
+  memcpy(pass1,p,16);
+  memcpy(pass2,p+16,16);
 
   *rparam_len = 4;
   *rparam = REALLOC(*rparam,*rparam_len);
@@ -1545,12 +1545,34 @@ static BOOL api_SetUserPassword(int cnum,uint16 vuid, char *param,char *data,
 
   DEBUG(3,("Set password for <%s>\n",user));
 
+  /*
+   * Attempt the plaintext password change first.
+   * Older versions of Windows seem to do this.
+   */
+
   if (password_ok(user,pass1,strlen(pass1),NULL) &&
       chgpasswd(user,pass1,pass2))
   {
     SSVAL(*rparam,0,NERR_Success);
   }
 
+  /*
+   * If the plaintext change failed, attempt
+   * the encrypted. NT will generate this
+   * after trying the samr method.
+   */
+
+  if(SVAL(*rparam,0) != NERR_Success)
+  {
+    struct smb_passwd *smbpw = NULL;
+
+    if(check_lanman_password(user,(unsigned char *)pass1,(unsigned char *)pass2, &smbpw) && 
+       change_lanman_password(smbpw,(unsigned char *)pass1,(unsigned char *)pass2))
+    {
+      SSVAL(*rparam,0,NERR_Success);
+    }
+  }
+
   bzero(pass1,sizeof(fstring));
   bzero(pass2,sizeof(fstring));         
         
index bf26475715588f646a88d40ebf4f28c1853a34ce..7b6a5635110d56b8e2889e21686ea6a60c1d843e 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Name mangling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 64253932abb97d4d090f11ed2d7c0629de5a6ee2..8c3f6f66304c0a6fcc1dc5dd58dafb98c497098d 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB messaging
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index c2b916a0af8523cbaccf7bb262cc42727c684fb2..567b8f54f2e7a069451b2d9e8d7c207058b826f8 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Password and authentication handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e2f704e6af988158c54db9c4ebe54e83c8d365f3..b5f9700f339311ad19504f832a67b7e84bb37d89 100644 (file)
@@ -2,9 +2,9 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Pipe SMB reply routines
-   Copyright (C) Andrew Tridgell 1992-1997,
-   Copyright (C) Luke Kenneth Casson Leighton 1996-1997.
-   Copyright (C) Paul Ashton  1997.
+   Copyright (C) Andrew Tridgell 1992-1998
+   Copyright (C) Luke Kenneth Casson Leighton 1996-1998
+   Copyright (C) Paul Ashton  1997-1998.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index f5f0a2102e307a7ca8a3607c2c0389e246b47a41..862ba97f7ead183acf96d7e4cf65c160fa4f9270 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    file read prediction routines
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 8333fa7cf223578d44866701c85b9aab489124b2..0a366e5ee6d00b5cd8d19a303419345259b2157a 100644 (file)
@@ -3,7 +3,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    support for quotas
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b1caee10a22857321e465fbbbcbcca36262bfc3f..746c79db21a9f42b49a8a971348a9287d4da138c 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Main SMB reply routines
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1586,7 +1586,7 @@ static BOOL can_delete(char *fname,int cnum,int dirtype)
   }
   if ((fmode & ~dirtype) & (aHIDDEN | aSYSTEM))
     return(False);
-  if (!check_file_sharing(cnum,fname)) return(False);
+  if (!check_file_sharing(cnum,fname,False)) return(False);
   return(True);
 }
 
@@ -3039,7 +3039,7 @@ static BOOL can_rename(char *fname,int cnum)
   if (!CAN_WRITE(cnum)) return(False);
 
   if (sys_lstat(fname,&sbuf) != 0) return(False);
-  if (!check_file_sharing(cnum,fname)) return(False);
+  if (!check_file_sharing(cnum,fname,True)) return(False);
 
   return(True);
 }
index aaf446bdf5a40091641aba19dd57a7abe180d550..01d379ebb33cfff0b6f50085bd0c0be68a266ccb 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Main SMB server routines
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1574,7 +1574,7 @@ static int access_table(int new_deny,int old_deny,int old_mode,
 check if the share mode on a file allows it to be deleted or unlinked
 return True if sharing doesn't prevent the operation
 ********************************************************************/
-BOOL check_file_sharing(int cnum,char *fname)
+BOOL check_file_sharing(int cnum,char *fname, BOOL rename_op)
 {
   int i;
   int ret = False;
@@ -1621,21 +1621,48 @@ BOOL check_file_sharing(int cnum,char *fname)
         if(share_entry->op_type & BATCH_OPLOCK)
         {
 
-          DEBUG(5,("check_file_sharing: breaking oplock (%x) on file %s, \
+          /*
+           * It appears that the NT redirector may have a bug, in that
+           * it tries to do an SMBmv on a file that it has open with a
+           * batch oplock, and then fails to respond to the oplock break
+           * request. This only seems to occur when the client is doing an
+           * SMBmv to the smbd it is using - thus we try and detect this
+           * condition by checking if the file being moved is open and oplocked by
+           * this smbd process, and then not sending the oplock break in this
+           * special case. If the file was open with a deny mode that 
+           * prevents the move the SMBmv will fail anyway with a share
+           * violation error. JRA.
+           */
+          if(rename_op && (share_entry->pid == pid))
+          {
+            DEBUG(0,("check_file_sharing: NT redirector workaround - rename attempted on \
+batch oplocked file %s, dev = %x, inode = %x\n", fname, dev, inode));
+#if 0
+            /* 
+             * This next line is a test that allows the deny-mode
+             * processing to be skipped. JRA.
+             */ 
+            continue;
+#endif
+          }
+          else
+          {
+            DEBUG(5,("check_file_sharing: breaking oplock (%x) on file %s, \
 dev = %x, inode = %x\n", share_entry->op_type, fname, dev, inode));
 
-          /* Oplock break.... */
-          unlock_share_entry(cnum, dev, inode, token);
-          if(request_oplock_break(share_entry, dev, inode) == False)
-          {
-            free((char *)old_shares);
-            DEBUG(0,("check_file_sharing: FAILED when breaking oplock (%x) on file %s, \
+            /* Oplock break.... */
+            unlock_share_entry(cnum, dev, inode, token);
+            if(request_oplock_break(share_entry, dev, inode) == False)
+            {
+              free((char *)old_shares);
+              DEBUG(0,("check_file_sharing: FAILED when breaking oplock (%x) on file %s, \
 dev = %x, inode = %x\n", old_shares[i].op_type, fname, dev, inode));
-            return False;
+              return False;
+            }
+            lock_share_entry(cnum, dev, inode, &token);
+            broke_oplock = True;
+            break;
           }
-          lock_share_entry(cnum, dev, inode, &token);
-          broke_oplock = True;
-          break;
         }
 
         /* someone else has a share lock on it, check to see 
@@ -2936,6 +2963,16 @@ inode = %x).\n", timestring(), fsp->name, fnum, dev, inode));
       shutdown_server = True;
       break;
     }
+
+    /*
+     * There are certain SMB requests that we shouldn't allow
+     * to recurse. opens, renames and deletes are the obvious
+     * ones. This is handled in the switch_message() function.
+     * If global_oplock_break is set they will push the packet onto
+     * the pending smb queue and return -1 (no reply).
+     * JRA.
+     */
+
     process_smb(inbuf, outbuf);
 
     /*
@@ -3009,6 +3046,8 @@ BOOL request_oplock_break(share_mode_entry *share_entry,
   char op_break_msg[OPLOCK_BREAK_MSG_LEN];
   struct sockaddr_in addr_out;
   int pid = getpid();
+  time_t start_time;
+  int time_left;
 
   if(pid == share_entry->pid)
   {
@@ -3062,7 +3101,10 @@ to pid %d on port %d for dev = %x, inode = %x. Error was %s\n",
    * While we get messages that aren't ours, loop.
    */
 
-  while(1)
+  start_time = time(NULL);
+  time_left = OPLOCK_BREAK_TIMEOUT+OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR;
+
+  while(time_left >= 0)
   {
     char op_break_reply[UDP_CMD_HEADER_LEN+OPLOCK_BREAK_MSG_LEN];
     int32 reply_msg_len;
@@ -3070,7 +3112,7 @@ to pid %d on port %d for dev = %x, inode = %x. Error was %s\n",
     char *reply_msg_start;
 
     if(receive_local_message(oplock_sock, op_break_reply, sizeof(op_break_reply),
-               (OPLOCK_BREAK_TIMEOUT+OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR) * 1000) == False)
+               time_left ? time_left * 1000 : 1) == False)
     {
       if(smb_read_error == READ_TIMEOUT)
       {
@@ -3093,23 +3135,6 @@ pid %d on port %d for dev = %x, inode = %x. Error was (%s).\n", timestring, shar
       return False;
     }
 
-    /* 
-     * If the response we got was not an answer to our message, but
-     * was a completely different request, push it onto the pending
-     * udp message stack so that we can deal with it in the main loop.
-     * It may be another oplock break request to us.
-     */
-
-    /*
-     * Local note from JRA. There exists the possibility of a denial
-     * of service attack here by allowing non-root processes running
-     * on a local machine sending many of these pending messages to
-     * a smbd port. Currently I'm not sure how to restrict the messages
-     * I will queue (although I could add a limit to the queue) to
-     * those received by root processes only. There should be a 
-     * way to make this bulletproof....
-     */
-
     reply_msg_len = IVAL(op_break_reply,UDP_CMD_LEN_OFFSET);
     reply_from_port = SVAL(op_break_reply,UDP_CMD_PORT_OFFSET);
 
@@ -3123,21 +3148,37 @@ pid %d on port %d for dev = %x, inode = %x. Error was (%s).\n", timestring, shar
       continue;
     }
 
-    if(((SVAL(reply_msg_start,UDP_MESSAGE_CMD_OFFSET) & CMD_REPLY) == 0) ||
-       (reply_from_port != share_entry->op_port) ||
+    /*
+     * Test to see if this is the reply we are awaiting.
+     */
+
+    if((SVAL(reply_msg_start,UDP_MESSAGE_CMD_OFFSET) & CMD_REPLY) &&
+       (reply_from_port == share_entry->op_port) && 
        (memcmp(&reply_msg_start[OPLOCK_BREAK_PID_OFFSET], 
                &op_break_msg[OPLOCK_BREAK_PID_OFFSET],
-               OPLOCK_BREAK_MSG_LEN - OPLOCK_BREAK_PID_OFFSET) != 0))
+               OPLOCK_BREAK_MSG_LEN - OPLOCK_BREAK_PID_OFFSET) == 0))
     {
-      DEBUG(3,("%s request_oplock_break: received other message whilst awaiting \
-oplock break response from pid %d on port %d for dev = %x, inode = %x.\n",
-             timestring(), share_entry->pid, share_entry->op_port, dev, inode));
-      if(push_local_message(op_break_reply, sizeof(op_break_reply)) == False)
-        return False;
-      continue;
+      /*
+       * This is the reply we've been waiting for.
+       */
+      break;
+    }
+    else
+    {
+      /*
+       * This is another message - probably a break request.
+       * Process it to prevent potential deadlock.
+       * Note that the code in switch_message() prevents
+       * us from recursing into here as any SMB requests
+       * we might process that would cause another oplock
+       * break request to be made will be queued.
+       * JRA.
+       */
+
+      process_local_message(oplock_sock, op_break_reply, sizeof(op_break_reply));
     }
 
-    break;
+    time_left -= (time(NULL) - start_time);
   }
 
   DEBUG(3,("%s request_oplock_break: broke oplock.\n", timestring()));
@@ -4495,7 +4536,7 @@ force write permissions on print services.
 #define TIME_INIT (1<<2)
 #define CAN_IPC (1<<3)
 #define AS_GUEST (1<<5)
-
+#define QUEUE_IN_OPLOCK (1<<6)
 
 /* 
    define a list of possible SMB messages and their corresponding
@@ -4529,20 +4570,20 @@ struct smb_message_struct
    {SMBsetatr,"SMBsetatr",reply_setatr,AS_USER | NEED_WRITE},
    {SMBchkpth,"SMBchkpth",reply_chkpth,AS_USER},
    {SMBsearch,"SMBsearch",reply_search,AS_USER},
-   {SMBopen,"SMBopen",reply_open,AS_USER},
+   {SMBopen,"SMBopen",reply_open,AS_USER | QUEUE_IN_OPLOCK },
 
    /* note that SMBmknew and SMBcreate are deliberately overloaded */   
    {SMBcreate,"SMBcreate",reply_mknew,AS_USER},
    {SMBmknew,"SMBmknew",reply_mknew,AS_USER}, 
 
-   {SMBunlink,"SMBunlink",reply_unlink,AS_USER | NEED_WRITE},
+   {SMBunlink,"SMBunlink",reply_unlink,AS_USER | NEED_WRITE | QUEUE_IN_OPLOCK},
    {SMBread,"SMBread",reply_read,AS_USER},
    {SMBwrite,"SMBwrite",reply_write,AS_USER},
    {SMBclose,"SMBclose",reply_close,AS_USER | CAN_IPC},
    {SMBmkdir,"SMBmkdir",reply_mkdir,AS_USER | NEED_WRITE},
    {SMBrmdir,"SMBrmdir",reply_rmdir,AS_USER | NEED_WRITE},
    {SMBdskattr,"SMBdskattr",reply_dskattr,AS_USER},
-   {SMBmv,"SMBmv",reply_mv,AS_USER | NEED_WRITE},
+   {SMBmv,"SMBmv",reply_mv,AS_USER | NEED_WRITE | QUEUE_IN_OPLOCK},
 
    /* this is a Pathworks specific call, allowing the 
       changing of the root path */
@@ -4550,8 +4591,8 @@ struct smb_message_struct
 
    {SMBlseek,"SMBlseek",reply_lseek,AS_USER},
    {SMBflush,"SMBflush",reply_flush,AS_USER},
-   {SMBctemp,"SMBctemp",reply_ctemp,AS_USER},
-   {SMBsplopen,"SMBsplopen",reply_printopen,AS_USER},
+   {SMBctemp,"SMBctemp",reply_ctemp,AS_USER | QUEUE_IN_OPLOCK },
+   {SMBsplopen,"SMBsplopen",reply_printopen,AS_USER | QUEUE_IN_OPLOCK },
    {SMBsplclose,"SMBsplclose",reply_printclose,AS_USER},
    {SMBsplretq,"SMBsplretq",reply_printqueue,AS_USER|AS_GUEST},
    {SMBsplwr,"SMBsplwr",reply_printwrite,AS_USER},
@@ -4578,10 +4619,10 @@ struct smb_message_struct
    {SMBtrans,"SMBtrans",reply_trans,AS_USER | CAN_IPC},
    {SMBtranss,"SMBtranss",NULL,AS_USER | CAN_IPC},
    {SMBioctls,"SMBioctls",NULL,AS_USER},
-   {SMBcopy,"SMBcopy",reply_copy,AS_USER | NEED_WRITE},
-   {SMBmove,"SMBmove",NULL,AS_USER | NEED_WRITE},
+   {SMBcopy,"SMBcopy",reply_copy,AS_USER | NEED_WRITE | QUEUE_IN_OPLOCK },
+   {SMBmove,"SMBmove",NULL,AS_USER | NEED_WRITE | QUEUE_IN_OPLOCK },
    
-   {SMBopenX,"SMBopenX",reply_open_and_X,AS_USER | CAN_IPC},
+   {SMBopenX,"SMBopenX",reply_open_and_X,AS_USER | CAN_IPC | QUEUE_IN_OPLOCK },
    {SMBreadX,"SMBreadX",reply_read_and_X,AS_USER},
    {SMBwriteX,"SMBwriteX",reply_write_and_X,AS_USER},
    {SMBlockingX,"SMBlockingX",reply_lockingX,AS_USER},
@@ -4593,7 +4634,7 @@ struct smb_message_struct
    /* LANMAN2.0 PROTOCOL FOLLOWS */
    {SMBfindnclose, "SMBfindnclose", reply_findnclose, AS_USER},
    {SMBfindclose, "SMBfindclose", reply_findclose,AS_USER},
-   {SMBtrans2, "SMBtrans2", reply_trans2, AS_USER},
+   {SMBtrans2, "SMBtrans2", reply_trans2, AS_USER | QUEUE_IN_OPLOCK },
    {SMBtranss2, "SMBtranss2", reply_transs2, AS_USER},
 
    /* messaging routines */
@@ -4675,6 +4716,20 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize
   else
     {
       DEBUG(3,("switch message %s (pid %d)\n",smb_messages[match].name,pid));
+
+      if(global_oplock_break && (smb_messages[match].flags & QUEUE_IN_OPLOCK))
+      {
+        /* 
+         * Queue this message as we are the process of an oplock break.
+         */
+
+        DEBUG(2,("%s: switch_message: queueing message due to being in oplock break state.\n",
+               timestring() ));
+
+        push_smb_message( inbuf, size);
+        return -1;
+      }          
+
       if (smb_messages[match].fn)
        {
          int cnum = SVAL(inbuf,smb_tid);
@@ -5259,6 +5314,10 @@ static void usage(char *pname)
   /* Setup the signals that allow the debug log level
      to by dynamically changed. */
  
+  /* If we are using the malloc debug code we can't use
+     SIGUSR1 and SIGUSR2 to do debug level changes. */
+
+#ifndef MEM_MAN
 #if defined(SIGUSR1)
   signal( SIGUSR1, SIGNAL_CAST sig_usr1 );
 #endif /* SIGUSR1 */
@@ -5266,6 +5325,7 @@ static void usage(char *pname)
 #if defined(SIGUSR2)
   signal( SIGUSR2, SIGNAL_CAST sig_usr2 );
 #endif /* SIGUSR2 */
+#endif /* MEM_MAN */
 
   DEBUG(3,("%s loaded services\n",timestring()));
 
index 42ce7f60ad0cac6fc1d80b244dc5689d8a2ede67..1b1802c95f659b8dbad01fdc8d41833d818936c3 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    external program running routine
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b52169a66b25a362f11a83d87e9386a7f1a0a04f..56843e04238fb2f830c0305f1a8bcd66cbdfc1c7 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB transaction2 handling
-   Copyright (C) Jeremy Allison 1994-1997
+   Copyright (C) Jeremy Allison 1994-1998
 
    Extensively modified by Andrew Tridgell, 1995
 
index 46a2de4f176281feec1a66955c89acc7c44c20c0..176f6ca2404a07a3e724ec32cb97da9d05f79601 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    uid/user handling
-   Copyright (C) Andrew Tridgell 1992-1997
+   Copyright (C) Andrew Tridgell 1992-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 07558274a52a1d12dcf9c416cde80c7fc2d102e3..dcb6ce831d352bb82e1f42e106bfcd4265547343 100644 (file)
@@ -2,7 +2,7 @@
 /*
 support vtp-sessions
 
-written by Christian A. Lademann <cal@zls.com>
+(C) written by Christian A. Lademann <cal@zls.com>
 */
 
 /*
index 8fb61633214fcaf1fe3a4ff6fe7ecdd3ce1b719c..adf3b4c3e608a98816ace234aea4ba34dbcd303e 100644 (file)
@@ -3,7 +3,7 @@
    Version 1.9.
    Create printer definition files.
 
-   Copyright (C) Jean-Francois.Micouleau@utc.fr, 10/26/97
+   Copyright (C) Jean-Francois.Micouleau@utc.fr, 10/26/97 - 1998
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ char *myfgets(char *s, int n, FILE *stream)
   int i;
 
   fgets(s,n,stream);
-  while (LString1 = strchr(s,'%')) {
+  while ((LString1 = strchr(s,'%')) != NULL) {
     if (!(LString2 = strchr(LString1+1,'%'))) break;
     *LString2 = '\0';
     strcpy(String,LString1+1);
@@ -56,7 +56,7 @@ char *myfgets(char *s, int n, FILE *stream)
       if (strncmp(sbuffer[i],String,strlen(String))==0)
       {
        strcpy(String,sbuffer[i]);
-       if (temp = strchr(String,'=')) ++temp;
+       if ((temp = strchr(String,'=')) != NULL) ++temp;
        strcpy(String,temp);
        break;
       }
@@ -330,7 +330,7 @@ void scan_copyfiles(FILE *fichier, char *chaine)
        } else {
          part = strchr(buffer[i],',');
          if (part) {
-           if (mpart = strrchr(part+1,',')) {
+           if ((mpart = strrchr(part+1,','))!=NULL) {
                strcpy(buffer[i],mpart+1);
            } else
                *part = '\0';
@@ -423,7 +423,7 @@ void scan_short_desc(FILE *fichier, char *short_desc)
        temp = strtok(languagemonitor,",");
        if (*temp == '"') ++temp;
        strcpy(languagemonitor,temp);
-       if (temp = strchr(languagemonitor,'"')) *temp = '\0';
+       if ((temp = strchr(languagemonitor,'"'))!=NULL) *temp = '\0';
   }
 
   if (i) fprintf(stderr,"End of section found\n");
index 06bc694e2081821f45731c7f3a200c26473cfaad..409d199640657a626c134ce563526b6d8d566aa0 100644 (file)
@@ -3,7 +3,7 @@
    Version 1.9.
    Create codepage files from codepage_def.XXX files.
 
-   Copyright (C) Jeremy Allison 1997
+   Copyright (C) Jeremy Allison 1997-1998.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b14887afabea4fb7db8cd02c18796fe39e15349c..5cd5a869a996a91b309db50c99cd556ee22d9935 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    NBT client - used to lookup netbios names
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 225b7fde83d56c2e37c613a5650b2551e0224027..598944baa5e0179d38fdb279afbb1a79deabb697 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Unix SMB/Netbios implementation. Version 1.9. smbpasswd module. Copyright
- * (C) Jeremy Allison 1995-1997.
+ * (C) Jeremy Allison 1995-1998
  * 
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free
index 1a05f2b1afe573ce266b863961ef51be6276af73..401dd25c895a87e2480745e4fc3f20f420507f04 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    status reporting
-   Copyright (C) Andrew Tridgell 1994-1997
+   Copyright (C) Andrew Tridgell 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index ca364cb8c94b88f02142805d913486713fce6de1..cc35d2d530ef8c66f071fb96d9f294e55c3d3bae 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    Test validity of smb.conf
-   Copyright (C) Karl Auer 1993, 1994-1997
+   Copyright (C) Karl Auer 1993, 1994-1998
 
    Extensively modified by Andrew Tridgell, 1995
    
index 4a2ddb7c6350d9a481fd5c0c2764c0db9931ced0..caa9e2740a070e7fb553e29b04f3d0c0c8e58a9e 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    test printer setup
-   Copyright (C) Karl Auer 1993, 1994-1997
+   Copyright (C) Karl Auer 1993, 1994-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 8711af3fe1ae2335ffa8c41bc5215420122e8db2..049a414eb943a9ce7149b8ecfcf79954e7828580 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    SMB torture tester
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e697f5537a3f1398938785a21f8bcc9277329e0d..ae60d72b7b7501751078d340bf2d285d9981ca75 100644 (file)
@@ -1,6 +1,6 @@
 /* 
    some simple CGI helper routines
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b3bfe6aa50687370acea16bd641cbc1a2ecf3d9e..566b899c8faca409bb37eb5a900d21d294648e0f 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    html smb.conf editing - prototype only
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2762b8610e7f1a5f5043be91847314c78a42639a..fd576620623ccd159314c1853b78b60c481869e0 100644 (file)
@@ -2,7 +2,7 @@
    Unix SMB/Netbios implementation.
    Version 1.9.
    html status reporting
-   Copyright (C) Andrew Tridgell 1997
+   Copyright (C) Andrew Tridgell 1997-1998
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by