summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-06-10 04:38:24 +0000
committerAndrew Tridgell <tridge@samba.org>1996-06-10 04:38:24 +0000
commitb551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc (patch)
treec046d26355a3f879f74680db5f2871f17e119554
parent0c96ac512fe1f9baf35a8c1c0eb83e001ffb54df (diff)
downloadsamba-b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc.tar.gz
got rid of a lot of redundent header files as we now globally generate
prototypes automatically using "make proto". This is much less prone to error than the old method of manually adding prototypes
-rw-r--r--source/client/client.c4
-rw-r--r--source/client/clitar.c7
-rw-r--r--source/include/proto.h118
-rw-r--r--source/include/smb.h9
-rw-r--r--source/lib/access.c4
-rw-r--r--source/lib/interface.c1
-rw-r--r--source/lib/ufc.c2
-rw-r--r--source/lib/username.c1
-rw-r--r--source/lib/util.c1
-rw-r--r--source/libsmb/nmblib.c1
-rw-r--r--source/libsmb/smbencrypt.c1
-rw-r--r--source/loadparm.h167
-rw-r--r--source/localnet.h2
-rw-r--r--source/locking/locking.c1
-rw-r--r--source/nameannounce.c1
-rw-r--r--source/namedb.c1
-rw-r--r--source/nameelect.c1
-rw-r--r--source/nameresp.c1
-rw-r--r--source/nameserv.c1
-rw-r--r--source/namework.c1
-rw-r--r--source/nmbd/nmbd.c1
-rw-r--r--source/nmbsync.c1
-rw-r--r--source/param/loadparm.c4
-rw-r--r--source/param/params.c1
-rw-r--r--source/params.h40
-rw-r--r--source/passdb/smbpass.c1
-rw-r--r--source/pcap.h35
-rw-r--r--source/printing/pcap.c2
-rw-r--r--source/printing/printing.c1
-rw-r--r--source/reply.h60
-rw-r--r--source/script/mkproto.awk39
-rw-r--r--source/smbd/chgpasswd.c1
-rw-r--r--source/smbd/dir.c1
-rw-r--r--source/smbd/ipc.c2
-rw-r--r--source/smbd/mangle.c1
-rw-r--r--source/smbd/message.c1
-rw-r--r--source/smbd/password.c1
-rw-r--r--source/smbd/predict.c1
-rw-r--r--source/smbd/quotas.c12
-rw-r--r--source/smbd/reply.c1
-rw-r--r--source/smbd/server.c3
-rw-r--r--source/smbd/trans2.c1
-rw-r--r--source/smbd/uid.c1
-rw-r--r--source/smbpass.h50
-rw-r--r--source/utils/status.c5
-rw-r--r--source/utils/testparm.c2
-rw-r--r--source/utils/testprns.c1
47 files changed, 175 insertions, 419 deletions
diff --git a/source/client/client.c b/source/client/client.c
index 9eb0bf8fd81..fbd208f91ac 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -3694,10 +3694,6 @@ static BOOL list_servers()
}
-
-
-void cmd_help();
-
/* This defines the commands supported by this client */
struct
{
diff --git a/source/client/clitar.c b/source/client/clitar.c
index 2de09c66c11..a4c1f00adf3 100644
--- a/source/client/clitar.c
+++ b/source/client/clitar.c
@@ -75,10 +75,7 @@ static void dozerobuf();
static void dotareof();
static void initarbuf();
static int do_setrattr();
-void cmd_tar();
-int process_tar();
-char **toktocliplist();
-int clipfind();
+
/* restore functions */
static long readtarheader();
static long unoct();
@@ -1486,7 +1483,7 @@ void cmd_setmode(void)
return;
}
-DEBUG(2, ("\nperm set %d %d\n", attra[ATTRSET], attra[ATTRRESET]));
+ DEBUG(2, ("\nperm set %d %d\n", attra[ATTRSET], attra[ATTRRESET]));
(void) do_setrattr(fname, attra[ATTRSET], ATTRSET);
(void) do_setrattr(fname, attra[ATTRRESET], ATTRRESET);
}
diff --git a/source/include/proto.h b/source/include/proto.h
index b8b178bf703..ffd8254aaa9 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -1,3 +1,4 @@
+/* This file is automatically generated with "make proto". DO NOT EDIT */
BOOL check_access(int snum);
BOOL allow_access(char *deny_list,char *allow_list,struct from_host *client);
BOOL fromhost(int sock,struct from_host *f);
@@ -75,6 +76,123 @@ struct in_addr *iface_ip(struct in_addr ip);
int reply_trans(char *inbuf,char *outbuf);
int interpret_coding_system(char *str, int def);
char *lp_string(char *s);
+char *lp_logfile(void);
+char *lp_smbrun(void);
+char *lp_configfile(void);
+char *lp_smb_passwd_file(void);
+char *lp_serverstring(void);
+char *lp_printcapname(void);
+char *lp_lockdir(void);
+char *lp_rootdir(void);
+char *lp_defaultservice(void);
+char *lp_msg_command(void);
+char *lp_dfree_command(void);
+char *lp_hosts_equiv(void);
+char *lp_auto_services(void);
+char *lp_passwd_program(void);
+char *lp_passwd_chat(void);
+char *lp_passwordserver(void);
+char *lp_workgroup(void);
+char *lp_domain_controller(void);
+char *lp_username_map(void);
+char *lp_character_set(void);
+char *lp_logon_script(void);
+char *lp_wins_server(void);
+char *lp_interfaces(void);
+BOOL lp_wins_support(void);
+BOOL lp_wins_proxy(void);
+BOOL lp_domain_master(void);
+BOOL lp_domain_logons(void);
+BOOL lp_preferred_master(void);
+BOOL lp_load_printers(void);
+BOOL lp_use_rhosts(void);
+BOOL lp_getwdcache(void);
+BOOL lp_readprediction(void);
+BOOL lp_readbmpx(void);
+BOOL lp_readraw(void);
+BOOL lp_writeraw(void);
+BOOL lp_null_passwords(void);
+BOOL lp_strip_dot(void);
+BOOL lp_encrypted_passwords(void);
+BOOL lp_syslog_only(void);
+BOOL lp_browse_list(void);
+int lp_os_level(void);
+int lp_max_ttl(void);
+int lp_max_log_size(void);
+int lp_mangledstack(void);
+int lp_maxxmit(void);
+int lp_maxmux(void);
+int lp_maxpacket(void);
+int lp_keepalive(void);
+int lp_passwordlevel(void);
+int lp_readsize(void);
+int lp_deadtime(void);
+int lp_maxprotocol(void);
+int lp_security(void);
+int lp_printing(void);
+int lp_maxdisksize(void);
+int lp_lpqcachetime(void);
+int lp_syslog(void);
+char *lp_preexec(int );
+char *lp_postexec(int );
+char *lp_rootpreexec(int );
+char *lp_rootpostexec(int );
+char *lp_servicename(int );
+char *lp_pathname(int );
+char *lp_dontdescend(int );
+char *lp_username(int );
+char *lp_guestaccount(int );
+char *lp_invalid_users(int );
+char *lp_valid_users(int );
+char *lp_admin_users(int );
+char *lp_printcommand(int );
+char *lp_lpqcommand(int );
+char *lp_lprmcommand(int );
+char *lp_lppausecommand(int );
+char *lp_lpresumecommand(int );
+char *lp_printername(int );
+char *lp_hostsallow(int );
+char *lp_hostsdeny(int );
+char *lp_magicscript(int );
+char *lp_magicoutput(int );
+char *lp_comment(int );
+char *lp_force_user(int );
+char *lp_force_group(int );
+char *lp_readlist(int );
+char *lp_writelist(int );
+char *lp_volume(int );
+char *lp_mangled_map(int );
+BOOL lp_alternate_permissions(int );
+BOOL lp_revalidate(int );
+BOOL lp_casesensitive(int );
+BOOL lp_preservecase(int );
+BOOL lp_shortpreservecase(int );
+BOOL lp_casemangle(int );
+BOOL lp_status(int );
+BOOL lp_hide_dot_files(int );
+BOOL lp_browseable(int );
+BOOL lp_readonly(int );
+BOOL lp_no_set_dir(int );
+BOOL lp_guest_ok(int );
+BOOL lp_guest_only(int );
+BOOL lp_print_ok(int );
+BOOL lp_postscript(int );
+BOOL lp_map_hidden(int );
+BOOL lp_map_archive(int );
+BOOL lp_locking(int );
+BOOL lp_strict_locking(int );
+BOOL lp_share_modes(int );
+BOOL lp_onlyuser(int );
+BOOL lp_manglednames(int );
+BOOL lp_widelinks(int );
+BOOL lp_syncalways(int );
+BOOL lp_map_system(int );
+BOOL lp_delete_readonly(int );
+int lp_create_mode(int );
+int lp_max_connections(int );
+int lp_defaultcase(int );
+int lp_minprintspace(int );
+char lp_magicchar(int );
BOOL lp_add_home(char *pszHomename, int iDefaultService, char *pszHomedir);
int lp_add_service(char *pszService, int iDefaultService);
BOOL lp_add_printer(char *pszPrintername, int iDefaultService);
diff --git a/source/include/smb.h b/source/include/smb.h
index 0be860d6a36..5fd2e0846bb 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -234,6 +234,15 @@ typedef char fstring[128];
typedef fstring string;
+struct smb_passwd {
+ int smb_userid;
+ char *smb_name;
+ unsigned char *smb_passwd; /* Null if no password */
+ unsigned char *smb_nt_passwd; /* Null if no password */
+ /* Other fields / flags may be added later */
+};
+
+
struct current_user {
int cnum, id;
int uid, gid;
diff --git a/source/lib/access.c b/source/lib/access.c
index 14a84b2fb44..224ede5968e 100644
--- a/source/lib/access.c
+++ b/source/lib/access.c
@@ -9,7 +9,6 @@ should be sent to Andrew.Tridgell@anu.edu.au
*/
#include "includes.h"
-#include "loadparm.h"
#define ALLOW_PURE_ADDRESSES
@@ -37,14 +36,11 @@ static char sep[] = ", \t";
#define FAIL (-1)
/* Forward declarations. */
-BOOL allow_access(char *deny_list,char *allow_list,struct from_host *client);
static int list_match(char *list,char *item, int (*match_fn)());
static int client_match(char *tok,char *item);
static int string_match(char *tok,char *s);
static int masked_match(char *tok, char *slash, char *s);
static int matchname(char *remotehost,struct in_addr addr);
-BOOL fromhost(int sock,struct from_host *f);
-
/* Size of logical line buffer. */
#define BUFLEN 2048
diff --git a/source/lib/interface.c b/source/lib/interface.c
index e93db5e57eb..f5dab3caffc 100644
--- a/source/lib/interface.c
+++ b/source/lib/interface.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source/lib/ufc.c b/source/lib/ufc.c
index ae48a8776d4..fc35fce80a4 100644
--- a/source/lib/ufc.c
+++ b/source/lib/ufc.c
@@ -656,8 +656,6 @@ static char *output_conversion(v1, v2, salt)
return outbuf;
}
-ufc_long *_ufc_doit();
-
/*
* UNIX crypt function
*/
diff --git a/source/lib/username.c b/source/lib/username.c
index 3d214fbbdab..0b82d79747b 100644
--- a/source/lib/username.c
+++ b/source/lib/username.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source/lib/util.c b/source/lib/util.c
index 6402b9a049d..fc47313b57b 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
pstring scope = "";
diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c
index e1737cd41c3..3434f31a333 100644
--- a/source/libsmb/nmblib.c
+++ b/source/libsmb/nmblib.c
@@ -21,7 +21,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c
index be22fc50fc6..c666e79547d 100644
--- a/source/libsmb/smbencrypt.c
+++ b/source/libsmb/smbencrypt.c
@@ -22,7 +22,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
#include "des.h"
#include "md4.h"
diff --git a/source/loadparm.h b/source/loadparm.h
deleted file mode 100644
index 780ed633cad..00000000000
--- a/source/loadparm.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- Unix SMB/Netbios implementation.
- Version 1.9.
- Parameter loading functions
- Copyright (C) Karl Auer 1993, 1994
-
- Extensively modified by Andrew Tridgell
-
- 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 Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/*
- *
- * Prototypes etc for loadparm.c.
- *
- */
-#ifndef _LOADPARM_H
-#define _LOADPARM_H
-
-#include "smb.h"
-
-extern BOOL lp_file_list_changed(void);
-extern void lp_killunused(BOOL (*snumused)(int ));
-extern BOOL lp_loaded(void);
-extern BOOL lp_snum_ok(int iService);
-extern BOOL lp_manglednames(int iService);
-extern char *lp_interfaces(void);
-extern char *lp_passwordserver(void);
-extern char *lp_passwd_program(void);
-extern char *lp_passwd_chat(void);
-extern char *lp_guestaccount(int iService);
-extern char *lp_printcapname(void);
-extern char *lp_lockdir(void);
-extern char *lp_logfile(void);
-extern char *lp_smbrun(void);
-extern char *lp_configfile(void);
-extern char *lp_smb_passwd_file(void);
-extern char *lp_rootdir(void);
-extern char *lp_defaultservice(void);
-extern char *lp_serverstring(void);
-extern char *lp_dfree_command(void);
-extern char *lp_msg_command(void);
-extern char *lp_workgroup(void);
-extern char *lp_domain_controller(void);
-extern char *lp_username_map(void);
-extern char *lp_hosts_equiv(void);
-extern char *lp_logon_script(void);
-extern char *lp_wins_server(void);
-extern char *lp_magicscript(int iService);
-extern char *lp_magicoutput(int iService);
-extern char *lp_mangled_map(int iService);
-char *volume_label(int snum);
-extern int lp_os_level(void);
-extern int lp_max_ttl(void);
-extern int lp_max_log_size(void);
-extern int lp_maxxmit(void);
-extern int lp_maxmux(void);
-extern int lp_mangledstack(void);
-extern BOOL lp_wins_support(void);
-extern BOOL lp_wins_proxy(void);
-extern BOOL lp_preferred_master(void);
-extern BOOL lp_domain_master(void);
-extern BOOL lp_domain_logons(void);
-extern BOOL lp_getwdcache(void);
-extern BOOL lp_use_rhosts(void);
-extern BOOL lp_readprediction(void);
-extern BOOL lp_readbmpx(void);
-extern BOOL lp_readraw(void);
-extern BOOL lp_writeraw(void);
-extern BOOL lp_null_passwords(void);
-extern BOOL lp_strip_dot(void);
-extern BOOL lp_encrypted_passwords(void);
-extern BOOL lp_syslog_only(void);
-extern BOOL lp_browse_list(void);
-extern int lp_numservices(void);
-extern int lp_keepalive(void);
-extern int lp_passwordlevel(void);
-extern int lp_security(void);
-extern int lp_printing(void);
-extern int lp_maxdisksize(void);
-extern int lp_lpqcachetime(void);
-extern int lp_syslog(void);
-extern int lp_deadtime(void);
-extern int lp_readsize(void);
-extern int lp_debuglevel(void);
-extern int lp_maxprotocol(void);
-extern int lp_maxpacket(void);
-extern char *lp_comment(int iService);
-extern char *lp_preexec(int iService);
-extern char *lp_postexec(int iService);
-extern char *lp_rootpreexec(int iService);
-extern char *lp_rootpostexec(int iService);
-extern char *lp_servicename(int iService);
-extern char *lp_pathname(int iService);
-extern char *lp_username(int iService);
-extern char *lp_invalid_users(int iService);
-extern char *lp_valid_users(int iService);
-extern char *lp_admin_users(int iService);
-extern char *lp_printcommand(int iService);
-extern char *lp_lpqcommand(int iService);
-extern char *lp_lprmcommand(int iService);
-extern char *lp_lppausecommand(int iService);
-extern char *lp_lpresumecommand(int iService);
-extern char *lp_printername(int iService);
-extern char *lp_hostsallow(int iService);
-extern char *lp_hostsdeny(int iService);
-extern char *lp_dontdescend(int iService);
-extern char *lp_force_user(int iService);
-extern char *lp_force_group(int iService);
-extern char *lp_readlist(int iService);
-extern char *lp_writelist(int iService);
-extern BOOL lp_alternate_permissions(int iService);
-extern BOOL lp_revalidate(int iService);
-extern BOOL lp_status(int iService);
-extern BOOL lp_hide_dot_files(int iService);
-extern BOOL lp_browseable(int iService);
-extern BOOL lp_widelinks(int iService);
-extern BOOL lp_syncalways(int iService);
-extern BOOL lp_readonly(int iService);
-extern BOOL lp_no_set_dir(int iService);
-extern BOOL lp_guest_ok(int iService);
-extern BOOL lp_guest_only(int iService);
-extern BOOL lp_print_ok(int iService);
-extern BOOL lp_postscript(int iService);
-extern BOOL lp_map_hidden(int iService);
-extern BOOL lp_map_archive(int iService);
-extern BOOL lp_locking(int iService);
-extern BOOL lp_strict_locking(int iService);
-extern BOOL lp_share_modes(int iService);
-extern BOOL lp_onlyuser(int iService);
-extern BOOL lp_map_system(int iService);
-extern BOOL lp_casesensitive(int iService);
-extern BOOL lp_casemangle(int iService);
-extern BOOL lp_preservecase(int iService);
-extern BOOL lp_shortpreservecase(int iService);
-extern BOOL lp_load(char *pszFname,BOOL global_only);
-extern void lp_dump(void);
-extern int lp_servicenumber(char *pszServiceName);
-extern BOOL lp_add_home(char *pszHomename,
- int iDefaultService, char *pszHomedir);
-extern int lp_add_service(char *service, int iDefaultService);
-extern BOOL lp_add_printer(char *pszPrintername, int iDefaultService);
-extern BOOL lp_readonly(int iService);
-extern int lp_create_mode(int iService);
-extern int lp_minprintspace(int iService);
-extern int lp_defaultcase(int iService);
-extern char lp_magicchar(int iService);
-extern int lp_max_connections(int iService);
-extern BOOL lp_add_home(char *pservice,int ifrom,char *phome);
-extern char *lp_string(char *s);
-extern BOOL lp_delete_readonly(int iService);
-char *my_workgroup(void);
-
-#endif
-
diff --git a/source/localnet.h b/source/localnet.h
deleted file mode 100644
index 6b2d89c76a4..00000000000
--- a/source/localnet.h
+++ /dev/null
@@ -1,2 +0,0 @@
-extern int ClientNMB;
-extern int ClientDGRAM;
diff --git a/source/locking/locking.c b/source/locking/locking.c
index 9ece7712665..e81e1125e80 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
extern connection_struct Connections[];
extern files_struct Files[];
diff --git a/source/nameannounce.c b/source/nameannounce.c
index ca2b53297a3..bb09a5d433d 100644
--- a/source/nameannounce.c
+++ b/source/nameannounce.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
#define TEST_CODE
diff --git a/source/namedb.c b/source/namedb.c
index a1ec9832371..11eea6976d7 100644
--- a/source/namedb.c
+++ b/source/namedb.c
@@ -27,7 +27,6 @@
#include "includes.h"
#include "smb.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source/nameelect.c b/source/nameelect.c
index dfb97b6c860..4479f660c9f 100644
--- a/source/nameelect.c
+++ b/source/nameelect.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source/nameresp.c b/source/nameresp.c
index 4f077f6d28d..b244d811597 100644
--- a/source/nameresp.c
+++ b/source/nameresp.c
@@ -21,7 +21,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source/nameserv.c b/source/nameserv.c
index 086e1aec2e3..22c1e7dbbaa 100644
--- a/source/nameserv.c
+++ b/source/nameserv.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source/namework.c b/source/namework.c
index a34d9e25a09..e9e939dd37f 100644
--- a/source/namework.c
+++ b/source/namework.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c
index 87a545aa1cc..a20c4eb9993 100644
--- a/source/nmbd/nmbd.c
+++ b/source/nmbd/nmbd.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source/nmbsync.c b/source/nmbsync.c
index 44698762d4b..55cc9a04e99 100644
--- a/source/nmbsync.c
+++ b/source/nmbsync.c
@@ -21,7 +21,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index fcd70b4b75e..f4aaa16e6a4 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -49,10 +49,6 @@
#include "includes.h"
-#include "params.h"
-#include "loadparm.h"
-#include "pcap.h"
-
BOOL bLoaded = False;
extern int DEBUGLEVEL;
diff --git a/source/param/params.c b/source/param/params.c
index d5d841dceb8..8ff3d59d280 100644
--- a/source/param/params.c
+++ b/source/param/params.c
@@ -57,7 +57,6 @@ the other = 3
#include "includes.h"
#include "smb.h"
-#include "params.h"
/* local variable pointing to passed filename */
static char *pszParmFile = NULL;
diff --git a/source/params.h b/source/params.h
deleted file mode 100644
index b3ccdf74d97..00000000000
--- a/source/params.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- Unix SMB/Netbios implementation.
- Version 1.9.
- Parameter loading utilities
- Copyright (C) Karl Auer 1993, 1994
-
- 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 Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/**************************************************************************
-PARAMS.H
-
-Copyright (C) 1990, 1991, 1992 Karl Auer
-
-Prototypes and definitions for PARAMS.C.
-**************************************************************************/
-#ifndef _PARAMS_H
-#define _PARAMS_H
-
-#include <stdio.h>
-#include "smb.h"
-
-#define PM_NOFILE 1
-#define PM_NOFILENAME 2
-#define PM_FILEERROR 3
-
-#endif
-
diff --git a/source/passdb/smbpass.c b/source/passdb/smbpass.c
index 35816c5c520..b1d46b38a17 100644
--- a/source/passdb/smbpass.c
+++ b/source/passdb/smbpass.c
@@ -19,7 +19,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source/pcap.h b/source/pcap.h
deleted file mode 100644
index 89ab359af65..00000000000
--- a/source/pcap.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- Unix SMB/Netbios implementation.
- Version 1.9.
- printcap parsing
- Copyright (C) Karl Auer 1993, 1994
-
- 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 Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/*
- *
- * Prototypes etc for pcap.c.
- *
- */
-#ifndef _PCAP_H
-#define _PCAP_H
-
-#include "smb.h"
-
-extern BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname);
-extern void pcap_printer_fn(void (*fn)());
-
-#endif
diff --git a/source/printing/pcap.c b/source/printing/pcap.c
index 8973b1627fb..13b850b3f5b 100644
--- a/source/printing/pcap.c
+++ b/source/printing/pcap.c
@@ -54,8 +54,6 @@
#include "includes.h"
#include "smb.h"
-#include "loadparm.h"
-#include "pcap.h"
extern int DEBUGLEVEL;
diff --git a/source/printing/printing.c b/source/printing/printing.c
index 2aa27926d9b..b6265798a12 100644
--- a/source/printing/printing.c
+++ b/source/printing/printing.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
extern connection_struct Connections[];
extern files_struct Files[];
diff --git a/source/reply.h b/source/reply.h
deleted file mode 100644
index f88229436f7..00000000000
--- a/source/reply.h
+++ /dev/null
@@ -1,60 +0,0 @@
-int reply_special(char *inbuf,char *outbuf);
-int reply_corep(char *outbuf);
-int reply_coreplus(char *outbuf);
-int reply_nt1(char *outbuf);
-int reply_lanman1(char *outbuf);
-int reply_lanman2(char *outbuf);
-int reply_tcon(char *inbuf,char *outbuf);
-int reply_tcon_and_X(char *inbuf,char *outbuf,int length,int bufsize);
-int reply_unknown(char *inbuf,char *outbuf);
-int reply_ioctl(char *inbuf,char *outbuf);
-int reply_sesssetup_and_X(char *inbuf,char *outbuf,int length,int bufsize);
-int reply_chkpth(char *inbuf,char *outbuf);
-int reply_getatr(char *inbuf,char *outbuf);
-int reply_setatr(char *inbuf,char *outbuf);
-int reply_dskattr(char *inbuf,char *outbuf);
-int reply_search(char *inbuf,char *outbuf);
-int reply_fclose(char *inbuf,char *outbuf);
-int reply_open(char *inbuf,char *outbuf);
-int reply_open_and_X(char *inbuf,char *outbuf,int length,int bufsize);
-int reply_ulogoffX(char *inbuf,char *outbuf,int length,int bufsize);
-int reply_mknew(char *inbuf,char *outbuf);
-int reply_ctemp(char *inbuf,char *outbuf);
-int reply_unlink(char *inbuf,char *outbuf);
-int reply_readbraw(char *inbuf, char *outbuf);
-int reply_lockread(char *inbuf,char *outbuf);
-int reply_read(char *inbuf,char *outbuf);
-int reply_read_and_X(char *inbuf,char *outbuf,int length,int bufsize);
-int reply_writebraw(char *inbuf,char *outbuf);
-int reply_writeunlock(char *inbuf,char *outbuf);
-int reply_write(char *inbuf,char *outbuf,int dum1,int dum2);
-int reply_write_and_X(char *inbuf,char *outbuf,int length,int bufsize);
-int reply_lseek(char *inbuf,char *outbuf);
-int reply_flush(char *inbuf,char *outbuf);
-int reply_exit(char *inbuf,char *outbuf);
-int reply_close(char *inbuf,char *outbuf);
-int reply_writeclose(char *inbuf,char *outbuf);
-int reply_lock(char *inbuf,char *outbuf);
-int reply_unlock(char *inbuf,char *outbuf);
-int reply_tdis(char *inbuf,char *outbuf);
-int reply_echo(char *inbuf,char *outbuf);
-int reply_printopen(char *inbuf,char *outbuf);
-int reply_printclose(char *inbuf,char *outbuf);
-int reply_printqueue(char *inbuf,char *outbuf);
-int reply_printwrite(char *inbuf,char *outbuf);
-int reply_mkdir(char *inbuf,char *outbuf);
-int reply_rmdir(char *inbuf,char *outbuf);
-int reply_mv(char *inbuf,char *outbuf);
-int reply_copy(char *inbuf,char *outbuf);
-int reply_setdir(char *inbuf,char *outbuf);
-int reply_lockingX(char *inbuf,char *outbuf,int length,int bufsize);
-int reply_readbmpx(char *inbuf,char *outbuf,int length,int bufsize);
-int reply_writebmpx(char *inbuf,char *outbuf);
-int reply_setattrE(char *inbuf,char *outbuf);
-int reply_getattrE(char *inbuf,char *outbuf);
-int reply_writebs(char *inbuf,char *outbuf);
-int reply_sends(char *inbuf,char *outbuf);
-int reply_sendstrt(char *inbuf,char *outbuf);
-int reply_sendend(char *inbuf,char *outbuf);
-int reply_sendtxt(char *inbuf,char *outbuf);
-int reply_transs2(char *inbuf,char *outbuf,int length,int bufsize);
diff --git a/source/script/mkproto.awk b/source/script/mkproto.awk
index d7b042652d1..3f3ef1c9fcb 100644
--- a/source/script/mkproto.awk
+++ b/source/script/mkproto.awk
@@ -3,6 +3,8 @@
BEGIN {
inheader=0;
+ print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */"
+ print ""
}
{
@@ -17,6 +19,43 @@ BEGIN {
}
}
+# we handle the loadparm.c fns separately
+
+/^FN_LOCAL_BOOL/ {
+ split($0,a,"[,()]")
+ printf "BOOL %s(int );\n", a[2]
+}
+
+/^FN_LOCAL_STRING/ {
+ split($0,a,"[,()]")
+ printf "char *%s(int );\n", a[2]
+}
+
+/^FN_LOCAL_INT/ {
+ split($0,a,"[,()]")
+ printf "int %s(int );\n", a[2]
+}
+
+/^FN_LOCAL_CHAR/ {
+ split($0,a,"[,()]")
+ printf "char %s(int );\n", a[2]
+}
+
+/^FN_GLOBAL_BOOL/ {
+ split($0,a,"[,()]")
+ printf "BOOL %s(void);\n", a[2]
+}
+
+/^FN_GLOBAL_STRING/ {
+ split($0,a,"[,()]")
+ printf "char *%s(void);\n", a[2]
+}
+
+/^FN_GLOBAL_INT/ {
+ split($0,a,"[,()]")
+ printf "int %s(void);\n", a[2]
+}
+
/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
next;
}
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c
index dc0514c1ed7..809ac4d224c 100644
--- a/source/smbd/chgpasswd.c
+++ b/source/smbd/chgpasswd.c
@@ -27,7 +27,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source/smbd/dir.c b/source/smbd/dir.c
index 32f2eb5e7de..55a59834685 100644
--- a/source/smbd/dir.c
+++ b/source/smbd/dir.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
extern connection_struct Connections[];
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index 916b0fb88e8..594e067ddd4 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -24,8 +24,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
-#include "pcap.h"
#ifdef CHECK_TYPES
#undef CHECK_TYPES
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c
index a43e7f62451..cf1ece558c7 100644
--- a/source/smbd/mangle.c
+++ b/source/smbd/mangle.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
extern int case_default;
diff --git a/source/smbd/message.c b/source/smbd/message.c
index 6a96b4c7a9c..b26a6605ed5 100644
--- a/source/smbd/message.c
+++ b/source/smbd/message.c
@@ -25,7 +25,6 @@
#include "includes.h"
-#include "loadparm.h"
/* look in server.c for some explanation of these variables */
extern int DEBUGLEVEL;
diff --git a/source/smbd/password.c b/source/smbd/password.c
index c2fe8a4f0d4..ae548b82669 100644
--- a/source/smbd/password.c
+++ b/source/smbd/password.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
extern int Protocol;
diff --git a/source/smbd/predict.c b/source/smbd/predict.c
index 8df381b367a..7f1692931c9 100644
--- a/source/smbd/predict.c
+++ b/source/smbd/predict.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c
index 4216aa1199f..6ba20faa6cd 100644
--- a/source/smbd/quotas.c
+++ b/source/smbd/quotas.c
@@ -273,7 +273,7 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
return(False) ;
devno = sbuf.st_dev ;
-DEBUG(5,("disk_quotas: looking for path \"%s\" devno=%o\n", path,devno));
+ DEBUG(5,("disk_quotas: looking for path \"%s\" devno=%o\n", path,devno));
if ( devno != devno_cached ) {
devno_cached = devno ;
#if defined(SUNOS5)
@@ -284,7 +284,8 @@ DEBUG(5,("disk_quotas: looking for path \"%s\" devno=%o\n", path,devno));
while (getmntent(fd, &mnt) == 0) {
if ( stat(mnt.mnt_mountp,&sbuf) == -1 )
continue ;
-DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n", mnt.mnt_mountp,sbuf.st_dev));
+ DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n",
+ mnt.mnt_mountp,sbuf.st_dev));
if (sbuf.st_dev == devno) {
found = True ;
break ;
@@ -302,7 +303,8 @@ DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n", mnt.mnt_mountp,sbuf.st_dev));
while ((mnt = getmntent(fd)) != NULL) {
if ( stat(mnt->mnt_dir,&sbuf) == -1 )
continue ;
-DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n", mnt->mnt_dir,sbuf.st_dev));
+ DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n",
+ mnt->mnt_dir,sbuf.st_dev));
if (sbuf.st_dev == devno) {
found = True ;
break ;
@@ -324,7 +326,7 @@ DEBUG(5,("disk_quotas: testing \"%s\" devno=%o\n", mnt->mnt_dir,sbuf.st_dev));
seteuid(0);
#if defined(SUNOS5)
-DEBUG(5,("disk_quotas: looking for quotas file \"%s\"\n", name));
+ DEBUG(5,("disk_quotas: looking for quotas file \"%s\"\n", name));
if((file=open(name, O_RDONLY))<0) {
setuid(user_id); /* Restore the original UID status */
seteuid(euser_id);
@@ -336,7 +338,7 @@ DEBUG(5,("disk_quotas: looking for quotas file \"%s\"\n", name));
ret = ioctl(file, Q_QUOTACTL, &command);
close(file);
#else
-DEBUG(5,("disk_quotas: trying quotactl on device \"%s\"\n", name));
+ DEBUG(5,("disk_quotas: trying quotactl on device \"%s\"\n", name));
ret = quotactl(Q_GETQUOTA, name, euser_id, &D);
#endif
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 4472e120aaa..43703982ec9 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -25,7 +25,6 @@
#include "includes.h"
-#include "loadparm.h"
#include "trans2.h"
/* look in server.c for some explanation of these variables */
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 25464d861c3..ecc8e4ce9c5 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -20,10 +20,7 @@
*/
#include "includes.h"
-#include "loadparm.h"
-#include "pcap.h"
#include "trans2.h"
-#include "reply.h"
pstring servicesf = CONFIGFILE;
extern pstring debugf;
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 60e9ae2b294..0b113a2ed0e 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -22,7 +22,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
#include "trans2.h"
extern int DEBUGLEVEL;
diff --git a/source/smbd/uid.c b/source/smbd/uid.c
index 625303350a6..555cd457e77 100644
--- a/source/smbd/uid.c
+++ b/source/smbd/uid.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source/smbpass.h b/source/smbpass.h
deleted file mode 100644
index 6ddca0b92dd..00000000000
--- a/source/smbpass.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef _SMBPASS_H_
-#define _SMBPASS_H_
-/*
- Unix SMB/Netbios implementation.
- Version 1.9.
- SMB parameters and setup
- Copyright (C) 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 Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-struct smb_passwd {
- int smb_userid;
- char *smb_name;
- unsigned char *smb_passwd; /* Null if no password */
- unsigned char *smb_nt_passwd; /* Null if no password */
- /* Other fields / flags may be added later */
-};
-
-/* Return a smb_passwd struct given a user name, 0 if fails. */
-struct smb_passwd *get_smbpwnam(char *user);
-
-#ifndef uchar
-#define uchar unsigned char
-#endif
-
-/* SMB Encryption functions. */
-void str_to_key(unsigned char *str,unsigned char *key);
-void E_P16(uchar *p14,uchar *p16);
-void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24);
-void E_md4hash(uchar *passwd,uchar *p16);
-void SMBencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24);
-void SMB_nt_encrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24);
-
-/* Password file lock/unlock routines */
-int pw_file_lock(char *name, int type, int secs);
-int pw_file_unlock(int fd);
-#endif
diff --git a/source/utils/status.c b/source/utils/status.c
index 65e9d975f14..3d520564895 100644
--- a/source/utils/status.c
+++ b/source/utils/status.c
@@ -28,7 +28,6 @@
#endif
#include "includes.h"
-#include "loadparm.h"
struct connect_record crec;
extern int DEBUGLEVEL;
@@ -39,10 +38,6 @@ static pstring Ucrit_username = ""; /* added by OH */
int Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */
int Ucrit_MaxPid=0; /* added by OH */
unsigned int Ucrit_IsActive = 0; /* added by OH */
-void Ucrit_addUsername(pstring username); /* added by OH */
-unsigned int Ucrit_checkUsername(pstring username); /* added by OH */
-void Ucrit_addPid(int pid); /* added by OH */
-unsigned int Ucrit_checkPid(int pid); /* added by OH */
int main(int argc, char *argv[])
{
diff --git a/source/utils/testparm.c b/source/utils/testparm.c
index c6fa674b2d3..1d6cc2b0003 100644
--- a/source/utils/testparm.c
+++ b/source/utils/testparm.c
@@ -34,8 +34,6 @@
#include "includes.h"
#include "smb.h"
-#include "params.h"
-#include "loadparm.h"
/* these live in util.c */
extern FILE *dbf;
diff --git a/source/utils/testprns.c b/source/utils/testprns.c
index 1474f0ecc60..b41b4a4c422 100644
--- a/source/utils/testprns.c
+++ b/source/utils/testprns.c
@@ -33,7 +33,6 @@
#include "includes.h"
#include "smb.h"
-#include "pcap.h"
/* these live in util.c */
extern FILE *dbf;