summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-01-23 08:30:30 +0000
committerJeremy Allison <jra@samba.org>1998-01-23 08:30:30 +0000
commitd1abadb4951457ce7a96fcda00c3511d25e1b8cb (patch)
tree462023f154fbe274c6f74b46606d6f0605790b80 /source
parent3909f45853a4deec52c4c67bd723a30601e6dae0 (diff)
downloadsamba-d1abadb4951457ce7a96fcda00c3511d25e1b8cb.tar.gz
samba-d1abadb4951457ce7a96fcda00c3511d25e1b8cb.tar.xz
samba-d1abadb4951457ce7a96fcda00c3511d25e1b8cb.zip
All: Copyright updates - THIS WILL BE ROLLED BACK to 1997 if Andrew requests !
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.
Diffstat (limited to 'source')
-rw-r--r--source/cgi.c2
-rw-r--r--source/client/client.c2
-rw-r--r--source/client/clientutil.c2
-rw-r--r--source/client/clitar.c2
-rw-r--r--source/client/ntclient.c2
-rw-r--r--source/client/smbmnt.c2
-rw-r--r--source/client/smbmount.c2
-rw-r--r--source/client/smbumount.c2
-rw-r--r--source/include/byteorder.h2
-rw-r--r--source/include/charset.h2
-rw-r--r--source/include/includes.h2
-rw-r--r--source/include/kanji.h2
-rw-r--r--source/include/nameserv.h2
-rw-r--r--source/include/proto.h8
-rw-r--r--source/include/smb.h8
-rw-r--r--source/include/trans2.h2
-rw-r--r--source/lib/charcnv.c62
-rw-r--r--source/lib/charset.c2
-rw-r--r--source/lib/fault.c2
-rw-r--r--source/lib/getsmbpass.c2
-rw-r--r--source/lib/interface.c2
-rw-r--r--source/lib/kanji.c2
-rw-r--r--source/lib/md4.c2
-rw-r--r--source/lib/replace.c2
-rw-r--r--source/lib/system.c2
-rw-r--r--source/lib/time.c2
-rw-r--r--source/lib/ufc.c2
-rw-r--r--source/lib/username.c2
-rw-r--r--source/lib/util.c56
-rw-r--r--source/libsmb/clientgen.c2
-rw-r--r--source/libsmb/credentials.c2
-rw-r--r--source/libsmb/namequery.c2
-rw-r--r--source/libsmb/nmblib.c2
-rw-r--r--source/libsmb/smbdes.c34
-rw-r--r--source/libsmb/smbencrypt.c2
-rw-r--r--source/libsmb/smberr.c2
-rw-r--r--source/locking/locking.c2
-rw-r--r--source/locking/locking_shm.c2
-rw-r--r--source/locking/locking_slow.c2
-rw-r--r--source/locking/shmem.c2
-rw-r--r--source/locking/shmem_sysv.c2
-rw-r--r--source/nameconf.c2
-rw-r--r--source/nmbd/asyncdns.c2
-rw-r--r--source/nmbd/nmbd.c6
-rw-r--r--source/nmbd/nmbd_become_dmb.c6
-rw-r--r--source/nmbd/nmbd_become_lmb.c6
-rw-r--r--source/nmbd/nmbd_browserdb.c6
-rw-r--r--source/nmbd/nmbd_browsesync.c8
-rw-r--r--source/nmbd/nmbd_elections.c6
-rw-r--r--source/nmbd/nmbd_incomingdgrams.c6
-rw-r--r--source/nmbd/nmbd_incomingrequests.c6
-rw-r--r--source/nmbd/nmbd_lmhosts.c2
-rw-r--r--source/nmbd/nmbd_logonnames.c6
-rw-r--r--source/nmbd/nmbd_mynames.c6
-rw-r--r--source/nmbd/nmbd_namelistdb.c6
-rw-r--r--source/nmbd/nmbd_namequery.c6
-rw-r--r--source/nmbd/nmbd_nameregister.c6
-rw-r--r--source/nmbd/nmbd_namerelease.c6
-rw-r--r--source/nmbd/nmbd_nodestatus.c6
-rw-r--r--source/nmbd/nmbd_packets.c8
-rw-r--r--source/nmbd/nmbd_processlogon.c6
-rw-r--r--source/nmbd/nmbd_responserecordsdb.c6
-rw-r--r--source/nmbd/nmbd_sendannounce.c8
-rw-r--r--source/nmbd/nmbd_serverlistdb.c6
-rw-r--r--source/nmbd/nmbd_subnetdb.c6
-rw-r--r--source/nmbd/nmbd_winsproxy.c2
-rw-r--r--source/nmbd/nmbd_winsserver.c2
-rw-r--r--source/nmbd/nmbd_workgroupdb.c6
-rw-r--r--source/param/loadparm.c2
-rw-r--r--source/param/params.c4
-rw-r--r--source/passdb/smbpass.c14
-rw-r--r--source/printing/pcap.c2
-rw-r--r--source/printing/print_svid.c6
-rw-r--r--source/printing/printing.c9
-rw-r--r--source/smbd/chgpasswd.c85
-rw-r--r--source/smbd/dir.c2
-rw-r--r--source/smbd/ipc.c34
-rw-r--r--source/smbd/mangle.c2
-rw-r--r--source/smbd/message.c2
-rw-r--r--source/smbd/password.c2
-rw-r--r--source/smbd/pipes.c6
-rw-r--r--source/smbd/predict.c2
-rw-r--r--source/smbd/quotas.c2
-rw-r--r--source/smbd/reply.c6
-rw-r--r--source/smbd/server.c164
-rw-r--r--source/smbd/smbrun.c2
-rw-r--r--source/smbd/trans2.c2
-rw-r--r--source/smbd/uid.c2
-rw-r--r--source/smbd/vt_mode.c2
-rw-r--r--source/utils/make_printerdef.c10
-rw-r--r--source/utils/make_smbcodepage.c2
-rw-r--r--source/utils/nmblookup.c2
-rw-r--r--source/utils/smbpasswd.c2
-rw-r--r--source/utils/status.c2
-rw-r--r--source/utils/testparm.c2
-rw-r--r--source/utils/testprns.c2
-rw-r--r--source/utils/torture.c2
-rw-r--r--source/web/cgi.c2
-rw-r--r--source/wsmbconf.c2
-rw-r--r--source/wsmbstatus.c2
100 files changed, 519 insertions, 251 deletions
diff --git a/source/cgi.c b/source/cgi.c
index e697f5537a3..ae60d72b7b7 100644
--- a/source/cgi.c
+++ b/source/cgi.c
@@ -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
diff --git a/source/client/client.c b/source/client/client.c
index 49982760e1d..d5b6f4bdcb8 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -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
diff --git a/source/client/clientutil.c b/source/client/clientutil.c
index e3786d60297..b945edf87f2 100644
--- a/source/client/clientutil.c
+++ b/source/client/clientutil.c
@@ -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
diff --git a/source/client/clitar.c b/source/client/clitar.c
index 05cb13656aa..6763d221cea 100644
--- a/source/client/clitar.c
+++ b/source/client/clitar.c
@@ -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
diff --git a/source/client/ntclient.c b/source/client/ntclient.c
index 7e360981c02..54ab49e3a65 100644
--- a/source/client/ntclient.c
+++ b/source/client/ntclient.c
@@ -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
diff --git a/source/client/smbmnt.c b/source/client/smbmnt.c
index 2891ea709cd..9f8eea1cac5 100644
--- a/source/client/smbmnt.c
+++ b/source/client/smbmnt.c
@@ -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
*
*/
diff --git a/source/client/smbmount.c b/source/client/smbmount.c
index abf00e2b785..847c4b1f3dd 100644
--- a/source/client/smbmount.c
+++ b/source/client/smbmount.c
@@ -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
diff --git a/source/client/smbumount.c b/source/client/smbumount.c
index 304da24ff6c..8d76aefc5ff 100644
--- a/source/client/smbumount.c
+++ b/source/client/smbumount.c
@@ -1,7 +1,7 @@
/*
* smbumount.c
*
- * Copyright (C) 1995 by Volker Lendecke
+ * Copyright (C) 1995-1998 by Volker Lendecke
*
*/
diff --git a/source/include/byteorder.h b/source/include/byteorder.h
index 4d972a5cac2..3371fd24cbc 100644
--- a/source/include/byteorder.h
+++ b/source/include/byteorder.h
@@ -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
diff --git a/source/include/charset.h b/source/include/charset.h
index fb184897c07..b6f79c03dde 100644
--- a/source/include/charset.h
+++ b/source/include/charset.h
@@ -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
diff --git a/source/include/includes.h b/source/include/includes.h
index 2d2ff63f888..f021fa952e7 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -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
diff --git a/source/include/kanji.h b/source/include/kanji.h
index 5e8173ee14c..101b98cfa34 100644
--- a/source/include/kanji.h
+++ b/source/include/kanji.h
@@ -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
diff --git a/source/include/nameserv.h b/source/include/nameserv.h
index 98a6cb330ac..7faad9aff4d 100644
--- a/source/include/nameserv.h
+++ b/source/include/nameserv.h
@@ -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
diff --git a/source/include/proto.h b/source/include/proto.h
index a8471d0c2df..3d478b92468 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -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);
diff --git a/source/include/smb.h b/source/include/smb.h
index e6c0565b056..9c55e3f8be4 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -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
diff --git a/source/include/trans2.h b/source/include/trans2.h
index 5218604e0e1..62b6a1a9bf7 100644
--- a/source/include/trans2.h
+++ b/source/include/trans2.h
@@ -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
diff --git a/source/lib/charcnv.c b/source/lib/charcnv.c
index e1a7ac01db5..f02fcb2f927 100644
--- a/source/lib/charcnv.c
+++ b/source/lib/charcnv.c
@@ -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"));
}
diff --git a/source/lib/charset.c b/source/lib/charset.c
index 95b3d01627e..74e3a8f358b 100644
--- a/source/lib/charset.c
+++ b/source/lib/charset.c
@@ -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
diff --git a/source/lib/fault.c b/source/lib/fault.c
index 61715a4f225..e3299c50dbd 100644
--- a/source/lib/fault.c
+++ b/source/lib/fault.c
@@ -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
diff --git a/source/lib/getsmbpass.c b/source/lib/getsmbpass.c
index e8cb683d0b1..3996c452696 100644
--- a/source/lib/getsmbpass.c
+++ b/source/lib/getsmbpass.c
@@ -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
diff --git a/source/lib/interface.c b/source/lib/interface.c
index ff7c6ee816f..9687e1336c6 100644
--- a/source/lib/interface.c
+++ b/source/lib/interface.c
@@ -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
diff --git a/source/lib/kanji.c b/source/lib/kanji.c
index f6aace84116..2027a344c26 100644
--- a/source/lib/kanji.c
+++ b/source/lib/kanji.c
@@ -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
diff --git a/source/lib/md4.c b/source/lib/md4.c
index 1c9c2e6ecd5..812566dbd38 100644
--- a/source/lib/md4.c
+++ b/source/lib/md4.c
@@ -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
diff --git a/source/lib/replace.c b/source/lib/replace.c
index b27909db034..a08d3d240e4 100644
--- a/source/lib/replace.c
+++ b/source/lib/replace.c
@@ -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
diff --git a/source/lib/system.c b/source/lib/system.c
index 1486600339a..f5fbae53abe 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -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
diff --git a/source/lib/time.c b/source/lib/time.c
index 5fc6595b6f1..5e6d01215f7 100644
--- a/source/lib/time.c
+++ b/source/lib/time.c
@@ -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
diff --git a/source/lib/ufc.c b/source/lib/ufc.c
index 3330111c2f5..17fd970c5b8 100644
--- a/source/lib/ufc.c
+++ b/source/lib/ufc.c
@@ -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
diff --git a/source/lib/username.c b/source/lib/username.c
index a7241d309f4..751b0e53363 100644
--- a/source/lib/username.c
+++ b/source/lib/username.c
@@ -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
diff --git a/source/lib/util.c b/source/lib/util.c
index 403ebb73eb8..1b9ed00c31a 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -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,19 +2524,33 @@ 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.
If a local udp message has been pushed onto the
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 */
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c
index 4185c19feac..319a77beb65 100644
--- a/source/libsmb/clientgen.c
+++ b/source/libsmb/clientgen.c
@@ -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
diff --git a/source/libsmb/credentials.c b/source/libsmb/credentials.c
index b06ca6ffc6d..9f5c70e5e4a 100644
--- a/source/libsmb/credentials.c
+++ b/source/libsmb/credentials.c
@@ -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
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c
index 9915ee92a85..207f064670c 100644
--- a/source/libsmb/namequery.c
+++ b/source/libsmb/namequery.c
@@ -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
diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c
index 0335f01833b..1400b884342 100644
--- a/source/libsmb/nmblib.c
+++ b/source/libsmb/nmblib.c
@@ -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
diff --git a/source/libsmb/smbdes.c b/source/libsmb/smbdes.c
index e4f8280f9bc..c345d051bd8 100644
--- a/source/libsmb/smbdes.c
+++ b/source/libsmb/smbdes.c
@@ -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);
}
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c
index 38d414cf23d..052dae06f10 100644
--- a/source/libsmb/smbencrypt.c
+++ b/source/libsmb/smbencrypt.c
@@ -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
diff --git a/source/libsmb/smberr.c b/source/libsmb/smberr.c
index 5149568c045..e8c4544394e 100644
--- a/source/libsmb/smberr.c
+++ b/source/libsmb/smberr.c
@@ -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
diff --git a/source/locking/locking.c b/source/locking/locking.c
index d654d038c81..189ac0bcfe7 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -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
diff --git a/source/locking/locking_shm.c b/source/locking/locking_shm.c
index 2e3278d3ddd..e3c65ce2863 100644
--- a/source/locking/locking_shm.c
+++ b/source/locking/locking_shm.c
@@ -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
diff --git a/source/locking/locking_slow.c b/source/locking/locking_slow.c
index 935ed09f60d..de2bb1701c1 100644
--- a/source/locking/locking_slow.c
+++ b/source/locking/locking_slow.c
@@ -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
diff --git a/source/locking/shmem.c b/source/locking/shmem.c
index 864f7c298b6..63d7ebd3d41 100644
--- a/source/locking/shmem.c
+++ b/source/locking/shmem.c
@@ -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
diff --git a/source/locking/shmem_sysv.c b/source/locking/shmem_sysv.c
index 6b5d9b1ea68..e415c2ebc5f 100644
--- a/source/locking/shmem_sysv.c
+++ b/source/locking/shmem_sysv.c
@@ -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
diff --git a/source/nameconf.c b/source/nameconf.c
index 19068780611..331ec13a95e 100644
--- a/source/nameconf.c
+++ b/source/nameconf.c
@@ -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
diff --git a/source/nmbd/asyncdns.c b/source/nmbd/asyncdns.c
index e0d262f72ca..ee3fdfcd17c 100644
--- a/source/nmbd/asyncdns.c
+++ b/source/nmbd/asyncdns.c
@@ -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
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c
index 744942ba464..b6e4244cd01 100644
--- a/source/nmbd/nmbd.c
+++ b/source/nmbd/nmbd.c
@@ -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)
{
diff --git a/source/nmbd/nmbd_become_dmb.c b/source/nmbd/nmbd_become_dmb.c
index d8788b73147..52065758bcd 100644
--- a/source/nmbd/nmbd_become_dmb.c
+++ b/source/nmbd/nmbd_become_dmb.c
@@ -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
diff --git a/source/nmbd/nmbd_become_lmb.c b/source/nmbd/nmbd_become_lmb.c
index 7bfd558003a..2420b2ec4b7 100644
--- a/source/nmbd/nmbd_become_lmb.c
+++ b/source/nmbd/nmbd_become_lmb.c
@@ -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
diff --git a/source/nmbd/nmbd_browserdb.c b/source/nmbd/nmbd_browserdb.c
index b2db7443707..ee3e4e4bde1 100644
--- a/source/nmbd/nmbd_browserdb.c
+++ b/source/nmbd/nmbd_browserdb.c
@@ -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
diff --git a/source/nmbd/nmbd_browsesync.c b/source/nmbd/nmbd_browsesync.c
index e4231e60175..94bdecb8fcb 100644
--- a/source/nmbd/nmbd_browsesync.c
+++ b/source/nmbd/nmbd_browsesync.c
@@ -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
@@ -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);
}
diff --git a/source/nmbd/nmbd_elections.c b/source/nmbd/nmbd_elections.c
index 8081de8382d..fa1e5986a8a 100644
--- a/source/nmbd/nmbd_elections.c
+++ b/source/nmbd/nmbd_elections.c
@@ -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
diff --git a/source/nmbd/nmbd_incomingdgrams.c b/source/nmbd/nmbd_incomingdgrams.c
index b1de27f1817..46d988e89af 100644
--- a/source/nmbd/nmbd_incomingdgrams.c
+++ b/source/nmbd/nmbd_incomingdgrams.c
@@ -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
diff --git a/source/nmbd/nmbd_incomingrequests.c b/source/nmbd/nmbd_incomingrequests.c
index 73abdf00504..57517c37345 100644
--- a/source/nmbd/nmbd_incomingrequests.c
+++ b/source/nmbd/nmbd_incomingrequests.c
@@ -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
diff --git a/source/nmbd/nmbd_lmhosts.c b/source/nmbd/nmbd_lmhosts.c
index 2dd1db81cd5..722c3681f55 100644
--- a/source/nmbd/nmbd_lmhosts.c
+++ b/source/nmbd/nmbd_lmhosts.c
@@ -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
diff --git a/source/nmbd/nmbd_logonnames.c b/source/nmbd/nmbd_logonnames.c
index b2431ec0a76..4128213f97c 100644
--- a/source/nmbd/nmbd_logonnames.c
+++ b/source/nmbd/nmbd_logonnames.c
@@ -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
diff --git a/source/nmbd/nmbd_mynames.c b/source/nmbd/nmbd_mynames.c
index 660b5450699..035d1e6d3f0 100644
--- a/source/nmbd/nmbd_mynames.c
+++ b/source/nmbd/nmbd_mynames.c
@@ -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
diff --git a/source/nmbd/nmbd_namelistdb.c b/source/nmbd/nmbd_namelistdb.c
index dfd8a80baa1..2237fc504d3 100644
--- a/source/nmbd/nmbd_namelistdb.c
+++ b/source/nmbd/nmbd_namelistdb.c
@@ -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
diff --git a/source/nmbd/nmbd_namequery.c b/source/nmbd/nmbd_namequery.c
index 5d98935fec7..bbd831cac8e 100644
--- a/source/nmbd/nmbd_namequery.c
+++ b/source/nmbd/nmbd_namequery.c
@@ -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
diff --git a/source/nmbd/nmbd_nameregister.c b/source/nmbd/nmbd_nameregister.c
index 3223159ace6..a3e4208cdcd 100644
--- a/source/nmbd/nmbd_nameregister.c
+++ b/source/nmbd/nmbd_nameregister.c
@@ -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
diff --git a/source/nmbd/nmbd_namerelease.c b/source/nmbd/nmbd_namerelease.c
index 8632dd76553..b2f9b478787 100644
--- a/source/nmbd/nmbd_namerelease.c
+++ b/source/nmbd/nmbd_namerelease.c
@@ -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
diff --git a/source/nmbd/nmbd_nodestatus.c b/source/nmbd/nmbd_nodestatus.c
index 267446c69dc..196c0f0ba72 100644
--- a/source/nmbd/nmbd_nodestatus.c
+++ b/source/nmbd/nmbd_nodestatus.c
@@ -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
diff --git a/source/nmbd/nmbd_packets.c b/source/nmbd/nmbd_packets.c
index 03bd3889fad..9dad5ddaa99 100644
--- a/source/nmbd/nmbd_packets.c
+++ b/source/nmbd/nmbd_packets.c
@@ -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
@@ -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];
diff --git a/source/nmbd/nmbd_processlogon.c b/source/nmbd/nmbd_processlogon.c
index cd2fbfd0a56..64f66038e03 100644
--- a/source/nmbd/nmbd_processlogon.c
+++ b/source/nmbd/nmbd_processlogon.c
@@ -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
diff --git a/source/nmbd/nmbd_responserecordsdb.c b/source/nmbd/nmbd_responserecordsdb.c
index 031853271b8..a075284a4af 100644
--- a/source/nmbd/nmbd_responserecordsdb.c
+++ b/source/nmbd/nmbd_responserecordsdb.c
@@ -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-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
diff --git a/source/nmbd/nmbd_sendannounce.c b/source/nmbd/nmbd_sendannounce.c
index e859ff6bb70..62e5f02d8c8 100644
--- a/source/nmbd/nmbd_sendannounce.c
+++ b/source/nmbd/nmbd_sendannounce.c
@@ -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-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
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
diff --git a/source/nmbd/nmbd_serverlistdb.c b/source/nmbd/nmbd_serverlistdb.c
index 6a6998f81dc..e94cb1da6e9 100644
--- a/source/nmbd/nmbd_serverlistdb.c
+++ b/source/nmbd/nmbd_serverlistdb.c
@@ -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
diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c
index 93aecc21f29..5e18fe9cc0c 100644
--- a/source/nmbd/nmbd_subnetdb.c
+++ b/source/nmbd/nmbd_subnetdb.c
@@ -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
diff --git a/source/nmbd/nmbd_winsproxy.c b/source/nmbd/nmbd_winsproxy.c
index 36b9e7843ce..ded37ebf308 100644
--- a/source/nmbd/nmbd_winsproxy.c
+++ b/source/nmbd/nmbd_winsproxy.c
@@ -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
diff --git a/source/nmbd/nmbd_winsserver.c b/source/nmbd/nmbd_winsserver.c
index 4a631a79b71..eb120e09188 100644
--- a/source/nmbd/nmbd_winsserver.c
+++ b/source/nmbd/nmbd_winsserver.c
@@ -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
diff --git a/source/nmbd/nmbd_workgroupdb.c b/source/nmbd/nmbd_workgroupdb.c
index 1b97b92721e..b8345257474 100644
--- a/source/nmbd/nmbd_workgroupdb.c
+++ b/source/nmbd/nmbd_workgroupdb.c
@@ -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
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 61a14c92492..ac0f932faed 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -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
diff --git a/source/param/params.c b/source/param/params.c
index a0a259c0070..2a0a253f208 100644
--- a/source/param/params.c
+++ b/source/param/params.c
@@ -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
diff --git a/source/passdb/smbpass.c b/source/passdb/smbpass.c
index 4109383fb47..ea386bfa9df 100644
--- a/source/passdb/smbpass.c
+++ b/source/passdb/smbpass.c
@@ -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
diff --git a/source/printing/pcap.c b/source/printing/pcap.c
index bff81b8661d..3698114a2f5 100644
--- a/source/printing/pcap.c
+++ b/source/printing/pcap.c
@@ -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
diff --git a/source/printing/print_svid.c b/source/printing/print_svid.c
index c1129ce88a5..3340568b14d 100644
--- a/source/printing/print_svid.c
+++ b/source/printing/print_svid.c
@@ -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)
diff --git a/source/printing/printing.c b/source/printing/printing.c
index 76b962606b7..71b89022e6e 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -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)));
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c
index 17401410cec..b516ec8ac8e 100644
--- a/source/smbd/chgpasswd.c
+++ b/source/smbd/chgpasswd.c
@@ -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;
+}
diff --git a/source/smbd/dir.c b/source/smbd/dir.c
index c12305499a5..d7516532632 100644
--- a/source/smbd/dir.c
+++ b/source/smbd/dir.c
@@ -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
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index ee2aec8c220..048dab8b3e4 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -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));
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c
index bf264757155..7b6a5635110 100644
--- a/source/smbd/mangle.c
+++ b/source/smbd/mangle.c
@@ -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
diff --git a/source/smbd/message.c b/source/smbd/message.c
index 64253932abb..8c3f6f66304 100644
--- a/source/smbd/message.c
+++ b/source/smbd/message.c
@@ -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
diff --git a/source/smbd/password.c b/source/smbd/password.c
index c2b916a0af8..567b8f54f2e 100644
--- a/source/smbd/password.c
+++ b/source/smbd/password.c
@@ -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
diff --git a/source/smbd/pipes.c b/source/smbd/pipes.c
index e2f704e6af9..b5f9700f339 100644
--- a/source/smbd/pipes.c
+++ b/source/smbd/pipes.c
@@ -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
diff --git a/source/smbd/predict.c b/source/smbd/predict.c
index f5f0a2102e3..862ba97f7ea 100644
--- a/source/smbd/predict.c
+++ b/source/smbd/predict.c
@@ -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
diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c
index 8333fa7cf22..0a366e5ee6d 100644
--- a/source/smbd/quotas.c
+++ b/source/smbd/quotas.c
@@ -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
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index b1caee10a22..746c79db21a 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -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);
}
diff --git a/source/smbd/server.c b/source/smbd/server.c
index aaf446bdf5a..01d379ebb33 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -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()));
diff --git a/source/smbd/smbrun.c b/source/smbd/smbrun.c
index 42ce7f60ad0..1b1802c95f6 100644
--- a/source/smbd/smbrun.c
+++ b/source/smbd/smbrun.c
@@ -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
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index b52169a66b2..56843e04238 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -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
diff --git a/source/smbd/uid.c b/source/smbd/uid.c
index 46a2de4f176..176f6ca2404 100644
--- a/source/smbd/uid.c
+++ b/source/smbd/uid.c
@@ -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
diff --git a/source/smbd/vt_mode.c b/source/smbd/vt_mode.c
index 07558274a52..dcb6ce831d3 100644
--- a/source/smbd/vt_mode.c
+++ b/source/smbd/vt_mode.c
@@ -2,7 +2,7 @@
/*
support vtp-sessions
-written by Christian A. Lademann <cal@zls.com>
+(C) written by Christian A. Lademann <cal@zls.com>
*/
/*
diff --git a/source/utils/make_printerdef.c b/source/utils/make_printerdef.c
index 8fb61633214..adf3b4c3e60 100644
--- a/source/utils/make_printerdef.c
+++ b/source/utils/make_printerdef.c
@@ -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");
diff --git a/source/utils/make_smbcodepage.c b/source/utils/make_smbcodepage.c
index 06bc694e208..409d1996406 100644
--- a/source/utils/make_smbcodepage.c
+++ b/source/utils/make_smbcodepage.c
@@ -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
diff --git a/source/utils/nmblookup.c b/source/utils/nmblookup.c
index b14887afabe..5cd5a869a99 100644
--- a/source/utils/nmblookup.c
+++ b/source/utils/nmblookup.c
@@ -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
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index 225b7fde83d..598944baa5e 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -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
diff --git a/source/utils/status.c b/source/utils/status.c
index 1a05f2b1afe..401dd25c895 100644
--- a/source/utils/status.c
+++ b/source/utils/status.c
@@ -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
diff --git a/source/utils/testparm.c b/source/utils/testparm.c
index ca364cb8c94..cc35d2d530e 100644
--- a/source/utils/testparm.c
+++ b/source/utils/testparm.c
@@ -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
diff --git a/source/utils/testprns.c b/source/utils/testprns.c
index 4a2ddb7c635..caa9e2740a0 100644
--- a/source/utils/testprns.c
+++ b/source/utils/testprns.c
@@ -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
diff --git a/source/utils/torture.c b/source/utils/torture.c
index 8711af3fe1a..049a414eb94 100644
--- a/source/utils/torture.c
+++ b/source/utils/torture.c
@@ -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
diff --git a/source/web/cgi.c b/source/web/cgi.c
index e697f5537a3..ae60d72b7b7 100644
--- a/source/web/cgi.c
+++ b/source/web/cgi.c
@@ -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
diff --git a/source/wsmbconf.c b/source/wsmbconf.c
index b3bfe6aa506..566b899c8fa 100644
--- a/source/wsmbconf.c
+++ b/source/wsmbconf.c
@@ -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
diff --git a/source/wsmbstatus.c b/source/wsmbstatus.c
index 2762b8610e7..fd576620623 100644
--- a/source/wsmbstatus.c
+++ b/source/wsmbstatus.c
@@ -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