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
commit7e3b4a1c0df1434eb3d02f93c736ce065f9898d8 (patch)
tree025b06cd0fe6aa7e228532c53318fc7fb8c0a9e0
parentb7ca915de8e8b6d9592ff52699ff271d99eaebc0 (diff)
downloadsamba-7e3b4a1c0df1434eb3d02f93c736ce065f9898d8.tar.gz
samba-7e3b4a1c0df1434eb3d02f93c736ce065f9898d8.tar.bz2
samba-7e3b4a1c0df1434eb3d02f93c736ce065f9898d8.zip
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 (This used to be commit b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc)
-rw-r--r--source3/client/client.c4
-rw-r--r--source3/client/clitar.c7
-rw-r--r--source3/include/proto.h118
-rw-r--r--source3/include/smb.h9
-rw-r--r--source3/lib/access.c4
-rw-r--r--source3/lib/interface.c1
-rw-r--r--source3/lib/ufc.c2
-rw-r--r--source3/lib/username.c1
-rw-r--r--source3/lib/util.c1
-rw-r--r--source3/libsmb/nmblib.c1
-rw-r--r--source3/libsmb/smbencrypt.c1
-rw-r--r--source3/loadparm.h167
-rw-r--r--source3/localnet.h2
-rw-r--r--source3/locking/locking.c1
-rw-r--r--source3/nameannounce.c1
-rw-r--r--source3/namedb.c1
-rw-r--r--source3/nameelect.c1
-rw-r--r--source3/nameresp.c1
-rw-r--r--source3/nameserv.c1
-rw-r--r--source3/namework.c1
-rw-r--r--source3/nmbd/nmbd.c1
-rw-r--r--source3/nmbsync.c1
-rw-r--r--source3/param/loadparm.c4
-rw-r--r--source3/param/params.c1
-rw-r--r--source3/params.h40
-rw-r--r--source3/passdb/smbpass.c1
-rw-r--r--source3/pcap.h35
-rw-r--r--source3/printing/pcap.c2
-rw-r--r--source3/printing/printing.c1
-rw-r--r--source3/reply.h60
-rw-r--r--source3/script/mkproto.awk39
-rw-r--r--source3/smbd/chgpasswd.c1
-rw-r--r--source3/smbd/dir.c1
-rw-r--r--source3/smbd/ipc.c2
-rw-r--r--source3/smbd/mangle.c1
-rw-r--r--source3/smbd/message.c1
-rw-r--r--source3/smbd/password.c1
-rw-r--r--source3/smbd/predict.c1
-rw-r--r--source3/smbd/quotas.c12
-rw-r--r--source3/smbd/reply.c1
-rw-r--r--source3/smbd/server.c3
-rw-r--r--source3/smbd/trans2.c1
-rw-r--r--source3/smbd/uid.c1
-rw-r--r--source3/smbpass.h50
-rw-r--r--source3/utils/status.c5
-rw-r--r--source3/utils/testparm.c2
-rw-r--r--source3/utils/testprns.c1
47 files changed, 175 insertions, 419 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 9eb0bf8fd8..fbd208f91a 100644
--- a/source3/client/client.c
+++ b/source3/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/source3/client/clitar.c b/source3/client/clitar.c
index 2de09c66c1..a4c1f00adf 100644
--- a/source3/client/clitar.c
+++ b/source3/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/source3/include/proto.h b/source3/include/proto.h
index b8b178bf70..ffd8254aaa 100644
--- a/source3/include/proto.h
+++ b/source3/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/source3/include/smb.h b/source3/include/smb.h
index 0be860d6a3..5fd2e0846b 100644
--- a/source3/include/smb.h
+++ b/source3/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/source3/lib/access.c b/source3/lib/access.c
index 14a84b2fb4..224ede5968 100644
--- a/source3/lib/access.c
+++ b/source3/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/source3/lib/interface.c b/source3/lib/interface.c
index e93db5e57e..f5dab3caff 100644
--- a/source3/lib/interface.c
+++ b/source3/lib/interface.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source3/lib/ufc.c b/source3/lib/ufc.c
index ae48a8776d..fc35fce80a 100644
--- a/source3/lib/ufc.c
+++ b/source3/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/source3/lib/username.c b/source3/lib/username.c
index 3d214fbbda..0b82d79747 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 6402b9a049..fc47313b57 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
pstring scope = "";
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index e1737cd41c..3434f31a33 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -21,7 +21,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index be22fc50fc..c666e79547 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -22,7 +22,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
#include "des.h"
#include "md4.h"
diff --git a/source3/loadparm.h b/source3/loadparm.h
deleted file mode 100644
index 780ed633ca..0000000000
--- a/source3/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/source3/localnet.h b/source3/localnet.h
deleted file mode 100644
index 6b2d89c76a..0000000000
--- a/source3/localnet.h
+++ /dev/null
@@ -1,2 +0,0 @@
-extern int ClientNMB;
-extern int ClientDGRAM;
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 9ece771266..e81e1125e8 100644
--- a/source3/locking/locking.c
+++ b/source3/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/source3/nameannounce.c b/source3/nameannounce.c
index ca2b53297a..bb09a5d433 100644
--- a/source3/nameannounce.c
+++ b/source3/nameannounce.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
#define TEST_CODE
diff --git a/source3/namedb.c b/source3/namedb.c
index a1ec983237..11eea6976d 100644
--- a/source3/namedb.c
+++ b/source3/namedb.c
@@ -27,7 +27,6 @@
#include "includes.h"
#include "smb.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source3/nameelect.c b/source3/nameelect.c
index dfb97b6c86..4479f660c9 100644
--- a/source3/nameelect.c
+++ b/source3/nameelect.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source3/nameresp.c b/source3/nameresp.c
index 4f077f6d28..b244d81159 100644
--- a/source3/nameresp.c
+++ b/source3/nameresp.c
@@ -21,7 +21,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source3/nameserv.c b/source3/nameserv.c
index 086e1aec2e..22c1e7dbba 100644
--- a/source3/nameserv.c
+++ b/source3/nameserv.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source3/namework.c b/source3/namework.c
index a34d9e25a0..e9e939dd37 100644
--- a/source3/namework.c
+++ b/source3/namework.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 87a545aa1c..a20c4eb999 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -26,7 +26,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source3/nmbsync.c b/source3/nmbsync.c
index 44698762d4..55cc9a04e9 100644
--- a/source3/nmbsync.c
+++ b/source3/nmbsync.c
@@ -21,7 +21,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int ClientNMB;
extern int ClientDGRAM;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index fcd70b4b75..f4aaa16e6a 100644
--- a/source3/param/loadparm.c
+++ b/source3/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/source3/param/params.c b/source3/param/params.c
index d5d841dceb..8ff3d59d28 100644
--- a/source3/param/params.c
+++ b/source3/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/source3/params.h b/source3/params.h
deleted file mode 100644
index b3ccdf74d9..0000000000
--- a/source3/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/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index 35816c5c52..b1d46b38a1 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -19,7 +19,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source3/pcap.h b/source3/pcap.h
deleted file mode 100644
index 89ab359af6..0000000000
--- a/source3/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/source3/printing/pcap.c b/source3/printing/pcap.c
index 8973b1627f..13b850b3f5 100644
--- a/source3/printing/pcap.c
+++ b/source3/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/source3/printing/printing.c b/source3/printing/printing.c
index 2aa27926d9..b6265798a1 100644
--- a/source3/printing/printing.c
+++ b/source3/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/source3/reply.h b/source3/reply.h
deleted file mode 100644
index f88229436f..0000000000
--- a/source3/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/source3/script/mkproto.awk b/source3/script/mkproto.awk
index d7b042652d..3f3ef1c9fc 100644
--- a/source3/script/mkproto.awk
+++ b/source3/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/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index dc0514c1ed..809ac4d224 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -27,7 +27,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 32f2eb5e7d..55a5983468 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
extern connection_struct Connections[];
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 916b0fb88e..594e067ddd 100644
--- a/source3/smbd/ipc.c
+++ b/source3/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/source3/smbd/mangle.c b/source3/smbd/mangle.c
index a43e7f6245..cf1ece558c 100644
--- a/source3/smbd/mangle.c
+++ b/source3/smbd/mangle.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
extern int case_default;
diff --git a/source3/smbd/message.c b/source3/smbd/message.c
index 6a96b4c7a9..b26a6605ed 100644
--- a/source3/smbd/message.c
+++ b/source3/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/source3/smbd/password.c b/source3/smbd/password.c
index c2fe8a4f0d..ae548b8266 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
extern int Protocol;
diff --git a/source3/smbd/predict.c b/source3/smbd/predict.c
index 8df381b367..7f1692931c 100644
--- a/source3/smbd/predict.c
+++ b/source3/smbd/predict.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index 4216aa1199..6ba20faa6c 100644
--- a/source3/smbd/quotas.c
+++ b/source3/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/source3/smbd/reply.c b/source3/smbd/reply.c
index 4472e120aa..43703982ec 100644
--- a/source3/smbd/reply.c
+++ b/source3/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/source3/smbd/server.c b/source3/smbd/server.c
index 25464d861c..ecc8e4ce9c 100644
--- a/source3/smbd/server.c
+++ b/source3/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/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 60e9ae2b29..0b113a2ed0 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -22,7 +22,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
#include "trans2.h"
extern int DEBUGLEVEL;
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 625303350a..555cd457e7 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -20,7 +20,6 @@
*/
#include "includes.h"
-#include "loadparm.h"
extern int DEBUGLEVEL;
diff --git a/source3/smbpass.h b/source3/smbpass.h
deleted file mode 100644
index 6ddca0b92d..0000000000
--- a/source3/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/source3/utils/status.c b/source3/utils/status.c
index 65e9d975f1..3d52056489 100644
--- a/source3/utils/status.c
+++ b/source3/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/source3/utils/testparm.c b/source3/utils/testparm.c
index c6fa674b2d..1d6cc2b000 100644
--- a/source3/utils/testparm.c
+++ b/source3/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/source3/utils/testprns.c b/source3/utils/testprns.c
index 1474f0ecc6..b41b4a4c42 100644
--- a/source3/utils/testprns.c
+++ b/source3/utils/testprns.c
@@ -33,7 +33,6 @@
#include "includes.h"
#include "smb.h"
-#include "pcap.h"
/* these live in util.c */
extern FILE *dbf;