summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-09 14:37:32 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-09 14:37:32 +0000
commit723b9d0d5b4b4ccc2852b21ebf65aab53cea862c (patch)
tree615e03b0e9d1c1aa90aeb376c870bc95d73c2a87
parent19c965894d73b1d39deedfc4cc04b9cbf52e571a (diff)
downloadsamba-723b9d0d5b4b4ccc2852b21ebf65aab53cea862c.tar.gz
samba-723b9d0d5b4b4ccc2852b21ebf65aab53cea862c.tar.bz2
samba-723b9d0d5b4b4ccc2852b21ebf65aab53cea862c.zip
swat compiles, with some even uglier hacks. we really have to do
something about our dependencies between seemingly unrelated code. (This used to be commit 3ecfd271de5e6f7b4868800e7c06d51ed69278fd)
-rw-r--r--source3/Makefile.in29
-rw-r--r--source3/bin/.cvsignore3
-rw-r--r--source3/include/proto.h131
3 files changed, 105 insertions, 58 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 0c9eb4fafa..b093003550 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -95,7 +95,8 @@ UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \
PARAM_OBJ = param/loadparm.o param/params.o param/pcap.o
LIBSMB_OBJ = libsmb/clientgen.o libsmb/namequery.o libsmb/nmblib.o \
- libsmb/nterr.o libsmb/smbdes.o libsmb/smbencrypt.o libsmb/smberr.o
+ libsmb/nterr.o libsmb/smbdes.o libsmb/smbencrypt.o \
+ libsmb/smberr.o libsmb/credentials.o
RPC_SERVER_OBJ = rpc_server/srv_ldap_helpers.o rpc_server/srv_lsa.o \
rpc_server/srv_lsa_hnd.o rpc_server/srv_netlog.o \
@@ -116,13 +117,13 @@ LOCKING_OBJ = locking/locking.o locking/locking_shm.o locking/locking_slow.o \
locking/shmem.o locking/shmem_sysv.o
PASSDB_OBJ = passdb/passdb.o passdb/smbpassfile.o passdb/username.o \
- passdb/smbpass.o
+ passdb/smbpass.o passdb/password.o
SMBD_OBJ1 = smbd/server.o smbd/access.o smbd/chgpasswd.o smbd/connection.o \
- smbd/credentials.o smbd/dfree.o smbd/dir.o \
+ smbd/dfree.o smbd/dir.o \
smbd/groupname.o smbd/ipc.o smbd/ldap.o smbd/mangle.o \
smbd/message.o smbd/nispass.o smbd/nttrans.o \
- smbd/password.o smbd/pipes.o smbd/predict.o \
+ smbd/pipes.o smbd/predict.o \
smbd/print_svid.o smbd/printing.o smbd/quotas.o smbd/reply.o \
smbd/ssl.o smbd/trans2.o smbd/uid.o
@@ -147,9 +148,14 @@ NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \
$(PASSDB_OBJ) $(LIB_OBJ)
+SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
+ web/swat.o $(PASSDB_OBJ) $(LIBSMB_OBJ) $(LOCKING_OBJ) \
+ $(PARAM_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \
+ $(UBIQX_OBJ) $(LIB_OBJ)
+
PROTO_OBJ = $(SMBD_OBJ1) $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \
$(RPC_SERVER_OBJ) $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) \
- $(LOCKING_OBJ) $(PASSDB_OBJ) $(LIB_OBJ)
+ $(LOCKING_OBJ) $(PASSDB_OBJ) $(SWAT_OBJ) $(LIB_OBJ)
######################################################################
# now the rules...
@@ -172,10 +178,13 @@ bin/nmbd: $(NMBD_OBJ)
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LIBS)
+bin/swat: $(SWAT_OBJ)
+ @echo Linking $@
+ @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LIBS)
-smbrun: smbrun.o
- @echo Linking smbrun
- @$(CC) $(FLAGS) -o smbrun smbrun.o $(LIBS)
+bin/smbrun: utils/smbrun.o
+ @echo Linking $@
+ @$(CC) $(FLAGS) -o $@ utils/smbrun.o $(LIBS)
nmblookup: $(LOOKUP_OBJ)
@echo Linking nmblookup
@@ -230,10 +239,6 @@ wsmbstatus: wsmbstatus.o $(UTILOBJ)
@echo Linking wsmbstatus
@$(CC) $(FLAGS) -o wsmbstatus wsmbstatus.o $(UTILOBJ) $(LIBS)
-swat: $(SWAT_OBJ)
- @echo Linking swat
- @$(CC) $(FLAGS) -o swat $(SWAT_OBJ) $(LIBS)
-
install: installbin installman installscripts installcp installswat
installbin: all
diff --git a/source3/bin/.cvsignore b/source3/bin/.cvsignore
new file mode 100644
index 0000000000..777b59da1a
--- /dev/null
+++ b/source3/bin/.cvsignore
@@ -0,0 +1,3 @@
+nmbd
+smbd
+swat
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 8af9925803..022c0a93c2 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -344,6 +344,21 @@ void cli_error(struct cli_state *cli, int *eclass, int *num);
void cli_sockopt(struct cli_state *cli, char *options);
int cli_setpid(struct cli_state *cli, int pid);
+/*The following definitions come from libsmb/credentials.c */
+
+char *credstr(uchar *cred);
+void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
+ uchar session_key[8]);
+void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp,
+ DOM_CHAL *cred);
+int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred,
+ UTIME timestamp);
+BOOL clnt_deal_with_creds(uchar sess_key[8],
+ DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred);
+BOOL deal_with_creds(uchar sess_key[8],
+ DOM_CRED *sto_clnt_cred,
+ DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred);
+
/*The following definitions come from libsmb/namequery.c */
BOOL name_status(int fd,char *name,int name_type,BOOL recurse,
@@ -1064,6 +1079,37 @@ uint32 pdb_gid_to_group_rid(gid_t gid);
BOOL pdb_rid_is_well_known(uint32 rid);
BOOL pdb_rid_is_user(uint32 rid);
+/*The following definitions come from passdb/password.c */
+
+void generate_next_challenge(char *challenge);
+BOOL set_challenge(char *challenge);
+BOOL last_challenge(unsigned char *challenge);
+user_struct *get_valid_user_struct(uint16 vuid);
+void invalidate_vuid(uint16 vuid);
+char *validated_username(uint16 vuid);
+int setup_groups(char *user, int uid, int gid, int *p_ngroups, GID_T **p_groups);
+uint16 register_vuid(int uid,int gid, char *unix_name, char *requested_name, BOOL guest);
+void add_session_user(char *user);
+BOOL update_smbpassword_file( char *user, fstring password);
+void dfs_unlogin(void);
+BOOL password_check(char *password);
+BOOL smb_password_check(char *password, unsigned char *part_passwd, unsigned char *c8);
+BOOL smb_password_ok(struct smb_passwd *smb_pass,
+ uchar lm_pass[24], uchar nt_pass[24]);
+BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd);
+BOOL user_ok(char *user,int snum);
+BOOL authorise_login(int snum,char *user,char *password, int pwlen,
+ BOOL *guest,BOOL *force,uint16 vuid);
+BOOL check_hosts_equiv(char *user);
+struct cli_state *server_client(void);
+struct cli_state *server_cryptkey(void);
+BOOL server_validate(char *user, char *domain,
+ char *pass, int passlen,
+ char *ntpass, int ntpasslen);
+BOOL domain_client_validate( char *user, char *domain,
+ char *smb_apasswd, int smb_apasslen,
+ char *smb_ntpasswd, int smb_ntpasslen);
+
/*The following definitions come from passdb/smbpass.c */
struct passdb_ops *file_initialize_password_db(void);
@@ -1804,21 +1850,6 @@ BOOL change_oem_password(struct smb_passwd *smbpw, char *new_passwd, BOOL overri
BOOL yield_connection(int cnum,char *name,int max_connections);
BOOL claim_connection(int cnum,char *name,int max_connections,BOOL Clear);
-/*The following definitions come from smbd/credentials.c */
-
-char *credstr(uchar *cred);
-void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
- uchar session_key[8]);
-void cred_create(uchar session_key[8], DOM_CHAL *stor_cred, UTIME timestamp,
- DOM_CHAL *cred);
-int cred_assert(DOM_CHAL *cred, uchar session_key[8], DOM_CHAL *stored_cred,
- UTIME timestamp);
-BOOL clnt_deal_with_creds(uchar sess_key[8],
- DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_srv_cred);
-BOOL deal_with_creds(uchar sess_key[8],
- DOM_CRED *sto_clnt_cred,
- DOM_CRED *rcv_clnt_cred, DOM_CRED *rtn_srv_cred);
-
/*The following definitions come from smbd/dfree.c */
int sys_disk_free(char *path,int *bsize,int *dfree,int *dsize);
@@ -1896,37 +1927,6 @@ void remove_pending_change_notify_requests_by_mid(int mid);
void process_pending_change_notify_queue(time_t t);
int reply_nttrans(char *inbuf,char *outbuf,int length,int bufsize);
-/*The following definitions come from smbd/password.c */
-
-void generate_next_challenge(char *challenge);
-BOOL set_challenge(char *challenge);
-BOOL last_challenge(unsigned char *challenge);
-user_struct *get_valid_user_struct(uint16 vuid);
-void invalidate_vuid(uint16 vuid);
-char *validated_username(uint16 vuid);
-int setup_groups(char *user, int uid, int gid, int *p_ngroups, GID_T **p_groups);
-uint16 register_vuid(int uid,int gid, char *unix_name, char *requested_name, BOOL guest);
-void add_session_user(char *user);
-BOOL update_smbpassword_file( char *user, fstring password);
-void dfs_unlogin(void);
-BOOL password_check(char *password);
-BOOL smb_password_check(char *password, unsigned char *part_passwd, unsigned char *c8);
-BOOL smb_password_ok(struct smb_passwd *smb_pass,
- uchar lm_pass[24], uchar nt_pass[24]);
-BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd);
-BOOL user_ok(char *user,int snum);
-BOOL authorise_login(int snum,char *user,char *password, int pwlen,
- BOOL *guest,BOOL *force,uint16 vuid);
-BOOL check_hosts_equiv(char *user);
-struct cli_state *server_client(void);
-struct cli_state *server_cryptkey(void);
-BOOL server_validate(char *user, char *domain,
- char *pass, int passlen,
- char *ntpass, int ntpasslen);
-BOOL domain_client_validate( char *user, char *domain,
- char *smb_apasswd, int smb_apasslen,
- char *smb_ntpasswd, int smb_ntpasslen);
-
/*The following definitions come from smbd/pipes.c */
int reply_open_pipe_and_X(char *inbuf,char *outbuf,int length,int bufsize);
@@ -2094,4 +2094,43 @@ BOOL unbecome_user(void );
int smbrun(char *cmd,char *outfile,BOOL shared);
void become_root(BOOL save_dir) ;
void unbecome_root(BOOL restore_dir);
+
+/*The following definitions come from web/cgi.c */
+
+void cgi_load_variables(FILE *f1);
+char *cgi_variable(char *name);
+char *cgi_vnum(int i, char **name);
+int cgi_boolean(char *name, int def);
+char *quotedup(char *s);
+char *urlquote(char *s);
+char *quotequotes(char *s);
+void quote_spaces(char *buf);
+void cgi_setup(char *rootdir, int auth_required);
+char *cgi_baseurl(void);
+char *cgi_rooturl(void);
+char *cgi_pathinfo(void);
+char *cgi_remote_host(void);
+char *cgi_remote_addr(void);
+BOOL cgi_waspost(void);
+
+/*The following definitions come from web/diagnose.c */
+
+BOOL nmbd_running(void);
+BOOL smbd_running(void);
+
+/*The following definitions come from web/startstop.c */
+
+void start_smbd(void);
+void start_nmbd(void);
+void stop_smbd(void);
+void stop_nmbd(void);
+void kill_pid(int pid);
+
+/*The following definitions come from web/statuspage.c */
+
+void status_page(void);
+
+/*The following definitions come from web/swat.c */
+
+int main(int argc, char *argv[]);
#endif /* _PROTO_H_ */