mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
*lots of small merges form HEAD
*sync up configure.in *don't build torture tools in make all *make sure to remove torture tools as part of make clean (This used to be commit 0fb724b3216eeeb97e61ff12755ca3a31bcad6ef)
This commit is contained in:
parent
35fa2e5975
commit
99cdb46208
@ -543,7 +543,7 @@ TDBBACKUP_OBJ = tdb/tdbbackup.o $(TDBBASE_OBJ)
|
||||
# now the rules...
|
||||
######################################################################
|
||||
all : SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(SHLIBS) \
|
||||
$(TORTURE_PROGS) @EXTRA_ALL_TARGETS@
|
||||
@EXTRA_ALL_TARGETS@
|
||||
|
||||
pam_smbpass : SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
|
||||
|
||||
@ -1014,7 +1014,7 @@ TOPFILES=dynconfig.o dynconfig.po
|
||||
|
||||
clean: delheaders python_clean
|
||||
-rm -f core */*~ *~ */*.o */*.po */*.po32 */*.@SHLIBEXT@ \
|
||||
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(VFS_MODULES) $(PDB_MODULES) .headers.stamp
|
||||
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(VFS_MODULES) $(PDB_MODULES) $(TORTURE_PROGS) .headers.stamp
|
||||
|
||||
# Making this target will just make sure that the prototype files
|
||||
# exist, not necessarily that they are up to date. Since they're
|
||||
|
@ -78,8 +78,12 @@ static void daemonize(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* If we get here - the child exited with some error status */
|
||||
exit(status);
|
||||
if (WIFSIGNALLED(status))
|
||||
exit(128 + WTERMSIG(status));
|
||||
else
|
||||
exit(WEXITSTATUS(status));
|
||||
}
|
||||
|
||||
signal( SIGTERM, SIG_DFL );
|
||||
|
27217
source3/configure
vendored
27217
source3/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -509,11 +509,7 @@ fi
|
||||
|
||||
############################################
|
||||
# we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the plugin loading code
|
||||
AC_CHECK_FUNCS(dlopen)
|
||||
if test x"$ac_cv_func_dlopen" = x"no"; then
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
|
||||
AC_DEFINE(HAVE_DLOPEN,1,[Whether we have dlopen()])])
|
||||
fi
|
||||
AC_SEARCH_LIBS(dlopen, [dl])
|
||||
# dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
|
||||
|
||||
############################################
|
||||
@ -616,12 +612,8 @@ AC_FUNC_MEMCMP
|
||||
|
||||
###############################################
|
||||
# test for where we get crypt() from
|
||||
AC_CHECK_FUNCS(crypt)
|
||||
if test x"$ac_cv_func_crypt" = x"no"; then
|
||||
AC_CHECK_LIB(crypt, crypt, [AUTHLIBS="$AUTHLIBS -lcrypt";
|
||||
AC_SEARCH_LIBS(crypt, [crypt], [AUTHLIBS="$AUTHLIBS -lcrypt";
|
||||
AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function])])
|
||||
fi
|
||||
|
||||
|
||||
###############################################
|
||||
# Readline included by default unless explicitly asked not to
|
||||
@ -729,12 +721,9 @@ if test x"$ac_cv_func_connect" = x"no"; then
|
||||
fi
|
||||
|
||||
###############################################
|
||||
# test for where we get get_yp_default_domain() from
|
||||
# test for where we get yp_get_default_domain() from
|
||||
AC_SEARCH_LIBS(yp_get_default_domain, [nsl])
|
||||
AC_CHECK_FUNCS(yp_get_default_domain)
|
||||
if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
|
||||
AC_CHECK_LIB(nsl, yp_get_default_domain, [LIBS="$LIBS -lnsl";
|
||||
AC_DEFINE(HAVE_YP_GET_DEFAULT_DOMAIN,1,[Whether the system has yp_get_default_domain()])])
|
||||
fi
|
||||
|
||||
# Check if we have execl, if not we need to compile smbrun.
|
||||
AC_CHECK_FUNCS(execl)
|
||||
@ -2827,20 +2816,21 @@ samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes,samba_cv_HAVE_BROKEN_LINUX_SENDFILE=no)]
|
||||
AC_CACHE_CHECK([for freebsd sendfile support],samba_cv_HAVE_SENDFILE,[
|
||||
AC_TRY_LINK([\
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/uio.h>],
|
||||
[\
|
||||
int fromfd, tofd;
|
||||
int fromfd, tofd, ret, total=0;
|
||||
off_t offset, nwritten;
|
||||
struct sf_hdtr hdr;
|
||||
struct iovec hdtrl;
|
||||
hdr->headers = &hdtrl;
|
||||
hdr->hdr_cnt = 1;
|
||||
hdr->trailers = NULL;
|
||||
hdr->trl_cnt = 0;
|
||||
hdr.headers = &hdtrl;
|
||||
hdr.hdr_cnt = 1;
|
||||
hdr.trailers = NULL;
|
||||
hdr.trl_cnt = 0;
|
||||
hdtrl.iov_base = NULL;
|
||||
hdtrl.iov_len = 0;
|
||||
int ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
|
||||
ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
|
||||
],
|
||||
samba_cv_HAVE_SENDFILE=yes,samba_cv_HAVE_SENDFILE=no)])
|
||||
|
||||
|
@ -754,6 +754,8 @@ extern int errno;
|
||||
#include "md5.h"
|
||||
#include "hmacmd5.h"
|
||||
|
||||
#include "ntlmssp.h"
|
||||
|
||||
#include "auth.h"
|
||||
|
||||
#include "passdb.h"
|
||||
|
@ -46,38 +46,6 @@ enum RPC_PKT_TYPE
|
||||
#define RPC_FLG_LAST 0x02
|
||||
#define RPC_FLG_NOCALL 0x20
|
||||
|
||||
/* NTLMSSP message types */
|
||||
enum NTLM_MESSAGE_TYPE
|
||||
{
|
||||
NTLMSSP_NEGOTIATE = 1,
|
||||
NTLMSSP_CHALLENGE = 2,
|
||||
NTLMSSP_AUTH = 3,
|
||||
NTLMSSP_UNKNOWN = 4
|
||||
};
|
||||
|
||||
/* NTLMSSP negotiation flags */
|
||||
#define NTLMSSP_NEGOTIATE_UNICODE 0x00000001
|
||||
#define NTLMSSP_NEGOTIATE_OEM 0x00000002
|
||||
#define NTLMSSP_REQUEST_TARGET 0x00000004
|
||||
#define NTLMSSP_NEGOTIATE_SIGN 0x00000010 /* Message integrity */
|
||||
#define NTLMSSP_NEGOTIATE_SEAL 0x00000020 /* Message confidentiality */
|
||||
#define NTLMSSP_NEGOTIATE_DATAGRAM_STYLE 0x00000040
|
||||
#define NTLMSSP_NEGOTIATE_LM_KEY 0x00000080
|
||||
#define NTLMSSP_NEGOTIATE_NETWARE 0x00000100
|
||||
#define NTLMSSP_NEGOTIATE_NTLM 0x00000200
|
||||
#define NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED 0x00001000
|
||||
#define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED 0x00002000
|
||||
#define NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL 0x00004000
|
||||
#define NTLMSSP_NEGOTIATE_ALWAYS_SIGN 0x00008000
|
||||
#define NTLMSSP_CHAL_INIT_RESPONSE 0x00010000
|
||||
#define NTLMSSP_CHAL_ACCEPT_RESPONSE 0x00020000
|
||||
#define NTLMSSP_CHAL_NON_NT_SESSION_KEY 0x00040000
|
||||
#define NTLMSSP_NEGOTIATE_NTLM2 0x00080000
|
||||
#define NTLMSSP_CHAL_TARGET_INFO 0x00800000
|
||||
#define NTLMSSP_NEGOTIATE_128 0x20000000 /* 128-bit encryption */
|
||||
#define NTLMSSP_NEGOTIATE_KEY_EXCH 0x40000000
|
||||
#define NTLMSSP_NEGOTIATE_080000000 0x80000000
|
||||
|
||||
#define SMBD_NTLMSSP_NEG_FLAGS 0x000082b1 /* ALWAYS_SIGN|NEG_NTLM|NEG_LM|NEG_SEAL|NEG_SIGN|NEG_UNICODE */
|
||||
|
||||
/* NTLMSSP signature version */
|
||||
|
@ -100,8 +100,6 @@
|
||||
|
||||
/* access various service details */
|
||||
#define SERVICE(snum) (lp_servicename(snum))
|
||||
#define PRINTCAP (lp_printcapname())
|
||||
#define PRINTCOMMAND(snum) (lp_printcommand(snum))
|
||||
#define PRINTERNAME(snum) (lp_printername(snum))
|
||||
#define CAN_WRITE(conn) (!conn->read_only)
|
||||
#define VALID_SNUM(snum) (lp_snum_ok(snum))
|
||||
|
@ -186,30 +186,6 @@ ssize_t read_udp_socket(int fd,char *buf,size_t len)
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
checks if read data is outstanding.
|
||||
********************************************************************/
|
||||
static int read_data_outstanding(int fd, unsigned int time_out)
|
||||
{
|
||||
int selrtn;
|
||||
fd_set fds;
|
||||
struct timeval timeout;
|
||||
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd, &fds);
|
||||
|
||||
timeout.tv_sec = (time_t) (time_out / 1000);
|
||||
timeout.tv_usec = (long)(1000 * (time_out % 1000));
|
||||
|
||||
selrtn = sys_select_intr(fd + 1, &fds, NULL, NULL, &timeout);
|
||||
|
||||
if (selrtn <= 0)
|
||||
{
|
||||
return selrtn;
|
||||
}
|
||||
return FD_ISSET(fd, &fds) ? 1 : 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Read data from a socket with a timout in msec.
|
||||
mincount = if timeout, minimum to read before returning
|
||||
@ -217,7 +193,7 @@ static int read_data_outstanding(int fd, unsigned int time_out)
|
||||
time_out = timeout in milliseconds
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out)
|
||||
ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t maxcnt,unsigned int time_out)
|
||||
{
|
||||
fd_set fds;
|
||||
int selrtn;
|
||||
@ -308,62 +284,6 @@ static ssize_t read_socket_with_timeout(int fd,char *buf,size_t mincnt,size_t ma
|
||||
return (ssize_t)nread;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Read data from a fd with a timout in msec.
|
||||
mincount = if timeout, minimum to read before returning
|
||||
maxcount = number to be read.
|
||||
time_out = timeout in milliseconds
|
||||
****************************************************************************/
|
||||
|
||||
ssize_t read_with_timeout(int fd, char *buf, size_t mincnt, size_t maxcnt,
|
||||
unsigned int time_out)
|
||||
{
|
||||
ssize_t readret;
|
||||
size_t nread = 0;
|
||||
|
||||
/* just checking .... */
|
||||
if (maxcnt <= 0)
|
||||
return(0);
|
||||
|
||||
/* Blocking read */
|
||||
if (time_out <= 0) {
|
||||
if (mincnt == 0) mincnt = maxcnt;
|
||||
|
||||
while (nread < mincnt) {
|
||||
readret = sys_read(fd, buf + nread, maxcnt - nread);
|
||||
|
||||
if (readret <= 0)
|
||||
return readret;
|
||||
|
||||
nread += readret;
|
||||
}
|
||||
return((ssize_t)nread);
|
||||
}
|
||||
|
||||
/* Most difficult - timeout read */
|
||||
/* If this is ever called on a disk file and
|
||||
mincnt is greater then the filesize then
|
||||
system performance will suffer severely as
|
||||
select always returns true on disk files */
|
||||
|
||||
for (nread=0; nread < mincnt; ) {
|
||||
int selrtn = read_data_outstanding(fd, time_out);
|
||||
|
||||
if(selrtn <= 0)
|
||||
return selrtn;
|
||||
|
||||
readret = sys_read(fd, buf+nread, maxcnt-nread);
|
||||
|
||||
if (readret <= 0)
|
||||
return readret;
|
||||
|
||||
nread += readret;
|
||||
}
|
||||
|
||||
/* Return the number we got */
|
||||
return((ssize_t)nread);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
read data from the client, reading exactly N bytes.
|
||||
****************************************************************************/
|
||||
|
@ -308,8 +308,22 @@ char *skip_string(char *buf,size_t n)
|
||||
|
||||
size_t str_charnum(const char *s)
|
||||
{
|
||||
push_ucs2(NULL, tmpbuf,s, sizeof(tmpbuf), STR_TERMINATE);
|
||||
return strlen_w(tmpbuf);
|
||||
uint16 tmpbuf2[sizeof(pstring)];
|
||||
push_ucs2(NULL, tmpbuf2,s, sizeof(tmpbuf2), STR_TERMINATE);
|
||||
return strlen_w(tmpbuf2);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Count the number of characters in a string. Normally this will
|
||||
be the same as the number of bytes in a string for single byte strings,
|
||||
but will be different for multibyte.
|
||||
********************************************************************/
|
||||
|
||||
size_t str_ascii_charnum(const char *s)
|
||||
{
|
||||
pstring tmpbuf2;
|
||||
push_ascii(tmpbuf2, s, sizeof(tmpbuf2), STR_TERMINATE);
|
||||
return strlen(tmpbuf2);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
@ -655,13 +669,11 @@ static BOOL string_init(char **dest,const char *src)
|
||||
}
|
||||
*dest = null_string;
|
||||
} else {
|
||||
(*dest) = (char *)malloc(l+1);
|
||||
(*dest) = strdup(src);
|
||||
if ((*dest) == NULL) {
|
||||
DEBUG(0,("Out of memory in string_init\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
pstrcpy(*dest,src);
|
||||
}
|
||||
return(True);
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ static int interpret_short_filename(struct cli_state *cli, char *p,file_info *fi
|
||||
strncpy(finfo->short_name,finfo->name, sizeof(finfo->short_name)-1);
|
||||
finfo->short_name[sizeof(finfo->short_name)-1] = '\0';
|
||||
}
|
||||
|
||||
|
||||
return(DIR_STRUCT_SIZE);
|
||||
}
|
||||
|
||||
|
@ -285,10 +285,13 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset,
|
||||
SIVAL(cli->outbuf,smb_vwv5,0);
|
||||
SSVAL(cli->outbuf,smb_vwv7,mode);
|
||||
|
||||
/*
|
||||
* THe following is still wrong ...
|
||||
*/
|
||||
SSVAL(cli->outbuf,smb_vwv8,(mode & 0x0008) ? size : 0);
|
||||
/*
|
||||
* According to CIFS-TR-1p00, this following field should only
|
||||
* be set if CAP_LARGE_WRITEX is set. We should check this
|
||||
* locally. However, this check might already have been
|
||||
* done by our callers.
|
||||
*/
|
||||
SSVAL(cli->outbuf,smb_vwv9,((size>>16)&1));
|
||||
SSVAL(cli->outbuf,smb_vwv10,size);
|
||||
SSVAL(cli->outbuf,smb_vwv11,
|
||||
|
@ -563,7 +563,7 @@ in workgroup %s on subnet %s\n",
|
||||
userdata->copy_fn = NULL;
|
||||
userdata->free_fn = NULL;
|
||||
userdata->userdata_len = strlen(work->work_group)+1;
|
||||
pstrcpy(userdata->data, work->work_group);
|
||||
fstrcpy(userdata->data, work->work_group);
|
||||
|
||||
/* Register the special browser group name. */
|
||||
register_name(subrec, MSBROWSE, 0x01, samba_nb_type|NB_GROUP,
|
||||
|
@ -333,7 +333,7 @@ static void find_domain_master_name_query_success(struct subnet_record *subrec,
|
||||
userdata->copy_fn = NULL;
|
||||
userdata->free_fn = NULL;
|
||||
userdata->userdata_len = strlen(work->work_group)+1;
|
||||
pstrcpy(userdata->data, work->work_group);
|
||||
fstrcpy(userdata->data, work->work_group);
|
||||
|
||||
node_status( subrec, &nmbname, answer_ip,
|
||||
domain_master_node_status_success,
|
||||
|
@ -121,7 +121,8 @@ static int pam_winbind_request(enum winbindd_cmd req_type,
|
||||
/* Copy reply data from socket */
|
||||
if (response->result != WINBINDD_OK) {
|
||||
if (response->data.auth.pam_error != PAM_SUCCESS) {
|
||||
_pam_log(LOG_ERR, "request failed, PAM error was %d, NT error was %s",
|
||||
_pam_log(LOG_ERR, "request failed: %s, PAM error was %d, NT error was %s",
|
||||
response->data.auth.error_string,
|
||||
response->data.auth.pam_error,
|
||||
response->data.auth.nt_status_string);
|
||||
return response->data.auth.pam_error;
|
||||
|
@ -2738,9 +2738,14 @@ BOOL is_printer_published(int snum, GUID *guid)
|
||||
SPOOL_DSSPOOLER_KEY)) < 0)
|
||||
return False;
|
||||
|
||||
ctr = &printer->info_2->data.keys[i].values;
|
||||
if (!(ctr = &printer->info_2->data.keys[i].values)) {
|
||||
return False;
|
||||
}
|
||||
|
||||
if (!(guid_val = regval_ctr_getvalue(ctr, "objectGUID"))) {
|
||||
return False;
|
||||
}
|
||||
|
||||
guid_val = regval_ctr_getvalue(ctr, "objectGUID");
|
||||
if (regval_size(guid_val) == sizeof(GUID))
|
||||
memcpy(guid, regval_data_p(guid_val), sizeof(GUID));
|
||||
|
||||
|
@ -54,15 +54,13 @@ struct printif cups_printif =
|
||||
* 'cups_passwd_cb()' - The CUPS password callback...
|
||||
*/
|
||||
|
||||
const char * /* O - Password or NULL */
|
||||
static const char * /* O - Password or NULL */
|
||||
cups_passwd_cb(const char *prompt) /* I - Prompt */
|
||||
{
|
||||
/*
|
||||
* Always return NULL to indicate that no password is available...
|
||||
*/
|
||||
|
||||
(void)prompt;
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -209,10 +207,10 @@ void cups_printer_fn(void (*fn)(char *, char *))
|
||||
/*
|
||||
* 'cups_printername_ok()' - Provide the equivalent of pcap_printername_ok()
|
||||
* for CUPS.
|
||||
* O - 1 if printer name OK
|
||||
* I - Name of printer
|
||||
*/
|
||||
|
||||
int /* O - 1 if printer name OK */
|
||||
cups_printername_ok(char *name) /* I - Name of printer */
|
||||
int cups_printername_ok(const char *name)
|
||||
{
|
||||
http_t *http; /* HTTP connection to server */
|
||||
ipp_t *request, /* IPP Request */
|
||||
|
@ -342,6 +342,7 @@ BOOL get_domain_user_groups(TALLOC_CTX *ctx, int *numgroups, DOM_GID **pgids, SA
|
||||
DEBUG(0,("get_domain_user_groups: primary gid of user [%s] is not a Domain group !\n", user_name));
|
||||
DEBUGADD(0,("get_domain_user_groups: You should fix it, NT doesn't like that\n"));
|
||||
|
||||
|
||||
done:
|
||||
*pgids=gids;
|
||||
*numgroups=cur_gid;
|
||||
|
@ -411,7 +411,7 @@ static NTSTATUS cmd_lsa_enum_privsaccounts(struct cli_state *cli,
|
||||
POLICY_HND user_pol;
|
||||
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
||||
uint32 access_desired = 0x000f000f;
|
||||
|
||||
|
||||
DOM_SID sid;
|
||||
uint32 count=0;
|
||||
LUID_ATTR *set;
|
||||
|
@ -5,7 +5,7 @@
|
||||
# run as root to get correct info from WIN95 clients.
|
||||
#
|
||||
# syntax:
|
||||
# findsmb [subnet broadcast address]
|
||||
# findsmb [-d|-D] [-r] [subnet broadcast address]
|
||||
#
|
||||
# with no agrument it will list machines on the current subnet
|
||||
#
|
||||
@ -13,21 +13,28 @@
|
||||
# local master browsers for that workgroup. There will be an "*" in front
|
||||
# of the workgroup name for machines that are the domain master browser for
|
||||
# that workgroup.
|
||||
#
|
||||
# Options:
|
||||
#
|
||||
# -d|-D enable debug
|
||||
# -r add -r option to nmblookup when finding netbios name
|
||||
#
|
||||
|
||||
$SAMBABIN = "@prefix@/bin";
|
||||
|
||||
for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
|
||||
for ($i = 0; $i < 2; $i++) { # test for -d and -r options
|
||||
$_ = shift;
|
||||
if (m/-d|-D/) {
|
||||
$DEBUG = 1;
|
||||
} else {
|
||||
if ($_) {
|
||||
$BCAST = "-B $_";
|
||||
}
|
||||
} else (m/-r/) {
|
||||
$R_OPTION = "-r";
|
||||
}
|
||||
}
|
||||
|
||||
if ($_) { # set broadcast address if it was specified
|
||||
$BCAST = "-B $_";
|
||||
}
|
||||
|
||||
sub ipsort # do numeric sort on last field of IP address
|
||||
{
|
||||
@t1 = split(/\./,$a);
|
||||
@ -56,7 +63,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
|
||||
|
||||
# find the netbios names registered by each machine
|
||||
|
||||
open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
|
||||
open(NMBLOOKUP,"$SAMBABIN/nmblookup $R_OPTION -A $ip|") ||
|
||||
die("Can't get nmb name list.\n");
|
||||
@nmblookup = <NMBLOOKUP>;
|
||||
close NMBLOOKUP;
|
||||
|
@ -7,6 +7,16 @@ shift
|
||||
shift
|
||||
shift
|
||||
|
||||
for d in $BASEDIR $LIBDIR; do
|
||||
if [ ! -d $d ]; then
|
||||
mkdir $d
|
||||
if [ ! -d $d ]; then
|
||||
echo Failed to make directory $d
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
for p in $*; do
|
||||
p2=`basename $p`
|
||||
echo Installing $p as $LIBDIR/$p2
|
||||
|
@ -249,9 +249,9 @@ static int expect(int master, char *issue, char *expected)
|
||||
nread = 0;
|
||||
buffer[nread] = 0;
|
||||
|
||||
while ((len = read_with_timeout(master, buffer + nread, 1,
|
||||
sizeof(buffer) - nread - 1,
|
||||
timeout)) > 0) {
|
||||
while ((len = read_socket_with_timeout(master, buffer + nread, 1,
|
||||
sizeof(buffer) - nread - 1,
|
||||
timeout)) > 0) {
|
||||
nread += len;
|
||||
buffer[nread] = 0;
|
||||
|
||||
@ -862,6 +862,10 @@ static NTSTATUS check_oem_password(const char *user,
|
||||
*/
|
||||
|
||||
new_pw_len = IVAL(lmdata, 512);
|
||||
|
||||
DEBUG(0, ("** new_pw_len = %d, new_passwd_size = %d\n",
|
||||
new_pw_len, new_passwd_size));
|
||||
|
||||
if (new_pw_len < 0 || new_pw_len > new_passwd_size - 1) {
|
||||
DEBUG(0,("check_oem_password: incorrect password length (%d).\n", new_pw_len));
|
||||
pdb_free_sam(&sampass);
|
||||
|
@ -155,7 +155,7 @@ int find_service(fstring service)
|
||||
char *pszTemp;
|
||||
|
||||
DEBUG(3,("checking whether %s is a valid printer name...\n", service));
|
||||
pszTemp = PRINTCAP;
|
||||
pszTemp = lp_printcapname();
|
||||
if ((pszTemp != NULL) && pcap_printername_ok(service, pszTemp))
|
||||
{
|
||||
DEBUG(3,("%s is a valid printer name\n", service));
|
||||
@ -751,7 +751,7 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password,
|
||||
{
|
||||
uid_t euid;
|
||||
user_struct *vuser = NULL;
|
||||
pstring service;
|
||||
fstring service;
|
||||
int snum = -1;
|
||||
|
||||
/* This must ONLY BE CALLED AS ROOT. As it exits this function as root. */
|
||||
@ -814,7 +814,7 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password,
|
||||
dev, status);
|
||||
}
|
||||
|
||||
pstrcpy(service, service_in);
|
||||
fstrcpy(service, service_in);
|
||||
|
||||
strlower(service);
|
||||
|
||||
|
@ -74,6 +74,10 @@ static int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned
|
||||
if (gotalarm) {
|
||||
DEBUG(0,("tdb_chainlock_with_timeout: alarm (%u) timed out for key %s in tdb %s\n",
|
||||
timeout, key.dptr, tdb->name ));
|
||||
/* TODO: If we time out waiting for a lock, it might
|
||||
* be nice to use F_GETLK to get the pid of the
|
||||
* process currently holding the lock and print that
|
||||
* as part of the debugging message. -- mbp */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -99,7 +103,7 @@ int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, unsigned int timeout
|
||||
void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval)
|
||||
{
|
||||
TDB_DATA key = make_tdb_data(keyval, strlen(keyval)+1);
|
||||
|
||||
|
||||
tdb_chainunlock(tdb, key);
|
||||
}
|
||||
|
||||
@ -256,8 +260,8 @@ BOOL tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value)
|
||||
int tdb_store_by_string(TDB_CONTEXT *tdb, const char *keystr, TDB_DATA data, int flags)
|
||||
{
|
||||
TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
|
||||
|
||||
return tdb_store(tdb, key, data, flags);
|
||||
|
||||
return tdb_store(tdb, key, data, flags);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -269,7 +273,7 @@ TDB_DATA tdb_fetch_by_string(TDB_CONTEXT *tdb, const char *keystr)
|
||||
{
|
||||
TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
|
||||
|
||||
return tdb_fetch(tdb, key);
|
||||
return tdb_fetch(tdb, key);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -280,7 +284,7 @@ int tdb_delete_by_string(TDB_CONTEXT *tdb, const char *keystr)
|
||||
{
|
||||
TDB_DATA key = make_tdb_data(keystr, strlen(keystr)+1);
|
||||
|
||||
return tdb_delete(tdb, key);
|
||||
return tdb_delete(tdb, key);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -42,6 +42,8 @@ int net_ads_usage(int argc, const char **argv)
|
||||
"\n\tshows some info on the server\n"\
|
||||
"\nnet ads status"\
|
||||
"\n\tdump the machine account details to stdout\n"
|
||||
"\nnet ads lookup"\
|
||||
"\n\tperform a CLDAP search on the server\n"
|
||||
"\nnet ads password <username@realm> -Uadmin_username@realm%%admin_pass"\
|
||||
"\n\tchange a user's password using an admin account"\
|
||||
"\n\t(note: use realm in UPPERCASE)\n"\
|
||||
|
@ -46,43 +46,6 @@ static char *C_user;
|
||||
static BOOL inetd_server;
|
||||
static BOOL got_request;
|
||||
|
||||
static void unescape(char *buf)
|
||||
{
|
||||
char *p=buf;
|
||||
|
||||
while ((p=strchr_m(p,'+')))
|
||||
*p = ' ';
|
||||
|
||||
p = buf;
|
||||
|
||||
while (p && *p && (p=strchr_m(p,'%'))) {
|
||||
int c1 = p[1];
|
||||
int c2 = p[2];
|
||||
|
||||
if (c1 >= '0' && c1 <= '9')
|
||||
c1 = c1 - '0';
|
||||
else if (c1 >= 'A' && c1 <= 'F')
|
||||
c1 = 10 + c1 - 'A';
|
||||
else if (c1 >= 'a' && c1 <= 'f')
|
||||
c1 = 10 + c1 - 'a';
|
||||
else {p++; continue;}
|
||||
|
||||
if (c2 >= '0' && c2 <= '9')
|
||||
c2 = c2 - '0';
|
||||
else if (c2 >= 'A' && c2 <= 'F')
|
||||
c2 = 10 + c2 - 'A';
|
||||
else if (c2 >= 'a' && c2 <= 'f')
|
||||
c2 = 10 + c2 - 'a';
|
||||
else {p++; continue;}
|
||||
|
||||
*p = (c1<<4) | c2;
|
||||
|
||||
memmove(p+1, p+3, strlen(p+3)+1);
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static char *grab_line(FILE *f, int *cl)
|
||||
{
|
||||
char *ret = NULL;
|
||||
@ -167,8 +130,8 @@ void cgi_load_variables(void)
|
||||
!variables[num_variables].value)
|
||||
continue;
|
||||
|
||||
unescape(variables[num_variables].value);
|
||||
unescape(variables[num_variables].name);
|
||||
rfc1738_unescape(variables[num_variables].value);
|
||||
rfc1738_unescape(variables[num_variables].name);
|
||||
|
||||
#ifdef DEBUG_COMMENTS
|
||||
printf("<!== POST var %s has value \"%s\" ==>\n",
|
||||
@ -198,8 +161,8 @@ void cgi_load_variables(void)
|
||||
!variables[num_variables].value)
|
||||
continue;
|
||||
|
||||
unescape(variables[num_variables].value);
|
||||
unescape(variables[num_variables].name);
|
||||
rfc1738_unescape(variables[num_variables].value);
|
||||
rfc1738_unescape(variables[num_variables].name);
|
||||
|
||||
#ifdef DEBUG_COMMENTS
|
||||
printf("<!== Commandline var %s has value \"%s\" ==>\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user