summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-06 18:08:01 -0800
committerJeremy Allison <jra@samba.org>2007-12-06 18:08:01 -0800
commite67a6620a7e5e3edb4a6c285841224bc4173fc44 (patch)
tree21eddbeffbec33aa91adf6110be7497f56854357 /source3
parentc6f03521555e9634f120e1b21ad8cdeb36354d41 (diff)
downloadsamba-e67a6620a7e5e3edb4a6c285841224bc4173fc44.tar.gz
samba-e67a6620a7e5e3edb4a6c285841224bc4173fc44.tar.bz2
samba-e67a6620a7e5e3edb4a6c285841224bc4173fc44.zip
Add popt to binaries in makefile. Hack clitar to compile until I fix it.
Jeremy. (This used to be commit 252ef28bb8f1406fdd92edba8538cb9e88f0b77f)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in81
-rw-r--r--source3/client/client.c12
-rw-r--r--source3/client/clitar.c19
3 files changed, 53 insertions, 59 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index a204ee701a..8ab2b9ec34 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -734,12 +734,13 @@ CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
$(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ)
MOUNT_OBJ = client/smbmount.o \
- $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
+ $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) \
+ $(POPT_LIB_OBJ)
-MNT_OBJ = client/smbmnt.o $(VERSION_OBJ) $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ)
+MNT_OBJ = client/smbmnt.o $(VERSION_OBJ) $(LIBREPLACE_OBJ) $(POPT_LIB_OBJ) $(SOCKET_WRAPPER_OBJ)
UMOUNT_OBJ = client/smbumount.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
- $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
+ $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ)
CIFS_MOUNT_OBJ = client/mount.cifs.o
@@ -1180,34 +1181,34 @@ bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/smbspool@EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ)
+bin/smbspool@EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/smbmount@EXEEXT@: $(BINARY_PREREQS) $(MOUNT_OBJ)
+bin/smbmount@EXEEXT@: $(BINARY_PREREQS) $(MOUNT_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/smbmnt@EXEEXT@: $(BINARY_PREREQS) $(MNT_OBJ)
+bin/smbmnt@EXEEXT@: $(BINARY_PREREQS) $(MNT_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(DYNEXP) $(LDFLAGS)
+ @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(DYNEXP) $(LDFLAGS) @POPTLIBS@
-bin/smbumount@EXEEXT@: $(BINARY_PREREQS) $(UMOUNT_OBJ)
+bin/smbumount@EXEEXT@: $(BINARY_PREREQS) $(UMOUNT_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/mount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_MOUNT_OBJ)
+bin/mount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_MOUNT_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
+ @$(CC) $(FLAGS) -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) @POPTLIBS@
-bin/umount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_UMOUNT_OBJ)
+bin/umount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_UMOUNT_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
+ @$(CC) $(FLAGS) -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) @POPTLIBS@
-bin/cifs.spnego@EXEEXT@: $(BINARY_PREREQS) $(CIFS_SPNEGO_OBJ) $(LIBSMBCLIENT_OBJ)
+bin/cifs.spnego@EXEEXT@: $(BINARY_PREREQS) $(CIFS_SPNEGO_OBJ) $(LIBSMBCLIENT_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(CIFS_SPNEGO_OBJ) $(DYNEXP) $(LDFLAGS) -lkeyutils $(LIBS) \
- $(LIBSMBCLIENT_OBJ) $(KRB5LIBS) $(LDAP_LIBS)
+ $(LIBSMBCLIENT_OBJ) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
bin/testparm@EXEEXT@: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@
@echo Linking $@
@@ -1249,27 +1250,27 @@ bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(LDAP_LIBS)
-bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ)
+bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ)
+bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \
- $(DYNEXP) $(LIBS) $(LDAP_LIBS)
+ $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/replacetort@EXEEXT@: $(REPLACETORT_OBJ)
+bin/replacetort@EXEEXT@: $(REPLACETORT_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
- $(DYNEXP) $(LIBS)
+ $(DYNEXP) $(LIBS) @POPTLIBS@
-bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ)
+bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/msgtest@EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ)
+bin/msgtest@EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
bin/smbcacls@EXEEXT@: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@
@echo Linking $@
@@ -1289,15 +1290,15 @@ bin/sharesec@EXEEXT@: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ)
+bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/nsstest@EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ)
+bin/nsstest@EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/pdbtest@EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ)
+bin/pdbtest@EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) $(LIBS) @POPTLIBS@
@@ -1313,26 +1314,26 @@ bin/log2pcap@EXEEXT@: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) @POPTLIBS@ $(LIBS)
-bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ)
+bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/rpctorture@EXEEXT@: $(BINARY_PREREQS) $(RPCTORTURE_OBJ)
+bin/rpctorture@EXEEXT@: $(BINARY_PREREQS) $(RPCTORTURE_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
-bin/ndrdump@EXEEXT@: $(BINARY_PREREQS) $(NDRDUMP_OBJ)
+bin/ndrdump@EXEEXT@: $(BINARY_PREREQS) $(NDRDUMP_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(NDRDUMP_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
@POPTLIBS@ @LDAP_LIBS@
-bin/debug2html@EXEEXT@: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ)
+bin/debug2html@EXEEXT@: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
-bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ)
+bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@
@echo Linking $@
- @$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
+ @$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@
bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@
@echo Linking $@
diff --git a/source3/client/client.c b/source3/client/client.c
index 5caad192b6..6514dc76af 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -1313,10 +1313,8 @@ static int cmd_mget(void)
{
TALLOC_CTX *ctx = talloc_tos();
uint16 attribute = aSYSTEM | aHIDDEN;
- char *mget_mask;
- char *buf;
-
- *mget_mask = 0;
+ char *mget_mask = NULL;
+ char *buf = NULL;
if (recurse) {
attribute |= aDIR;
@@ -4369,7 +4367,7 @@ static int process(const char *base_directory)
static int do_host_query(const char *query_host)
{
- cli = cli_cm_open(talloc_tos(), query_host, "IPC$", true);
+ cli = cli_cm_open(talloc_tos(), NULL, query_host, "IPC$", true);
if (!cli)
return 1;
@@ -4382,7 +4380,7 @@ static int do_host_query(const char *query_host)
cli_cm_shutdown();
cli_cm_set_port( 139 );
- cli = cli_cm_open(talloc_tos(), query_host, "IPC$", true);
+ cli = cli_cm_open(talloc_tos(), NULL, query_host, "IPC$", true);
}
if (cli == NULL) {
@@ -4575,7 +4573,7 @@ static int do_message_op(void)
}
/* if the service has already been retrieved then check if we have also a password */
- if (service_opt && (!cmdline_auth_info.got_pass) && poptPeekArg(pc)) {
+ if (service_opt && (!get_cmdline_auth_info_got_pass()) && poptPeekArg(pc)) {
set_cmdline_auth_info_password(poptGetArg(pc));
}
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index cb7a5deddd..1b0ea59a9a 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -38,6 +38,8 @@
#include "clitar.h"
#include "client/client_proto.h"
+static pstring cur_dir; /* FIXME !!! JRA*/
+
static int clipfind(char **aret, int ret, char *tok);
typedef struct file_info_struct file_info2;
@@ -102,7 +104,6 @@ static char **cliplist=NULL;
static int clipn=0;
static bool must_free_cliplist = False;
-extern file_info def_finfo;
extern bool lowercase;
extern uint16 cnum;
extern bool readbraw_supported;
@@ -117,7 +118,7 @@ static int tarhandle;
static void writetarheader(int f, const char *aname, SMB_BIG_UINT size, time_t mtime,
const char *amode, unsigned char ftype);
static void do_atar(char *rname,char *lname,file_info *finfo1);
-static void do_tar(file_info *finfo);
+static void do_tar(file_info *finfo, const char *dir);
static void oct_it(SMB_BIG_UINT value, int ndgs, char *p);
static void fixtarname(char *tptr, const char *fp, size_t l);
static int dotarbuf(int f, char *b, int n);
@@ -629,14 +630,8 @@ static void do_atar(char *rname,char *lname,file_info *finfo1)
finfo.ctime_ts = finfo1 -> ctime_ts;
finfo.name = finfo1 -> name;
} else {
- finfo.size = def_finfo.size;
- finfo.mode = def_finfo.mode;
- finfo.uid = def_finfo.uid;
- finfo.gid = def_finfo.gid;
- finfo.mtime_ts = def_finfo.mtime_ts;
- finfo.atime_ts = def_finfo.atime_ts;
- finfo.ctime_ts = def_finfo.ctime_ts;
- finfo.name = def_finfo.name;
+ /* DEAL WITH NULL finfo1. */
+ /* FIXME !!! JRA */
}
if (dry_run) {
@@ -650,7 +645,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1)
fnum = cli_open(cli, rname, O_RDONLY, DENY_NONE);
- pstring_clean_name(rname);
+/* pstring_clean_name(rname); FIXME !!! JRA */
if (fnum == -1) {
DEBUG(0,("%s opening remote file %s (%s)\n",
@@ -793,7 +788,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1)
Append single file to tar file (or not)
***************************************************************************/
-static void do_tar(file_info *finfo)
+static void do_tar(file_info *finfo, const char *dir)
{
pstring rname;