mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf. include/includes.h: Fix YP problem. include/smb.h: Fix ZERO_STRUCTP. lib/util_sock.c: Added strerror() in debugs. passdb/ldap.c: Don't use snprinf, use slprintf. rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf. script/installman.sh: DGUX changes. smbd/open.c smbd/oplock.c: Fixed gcc warnings. web/swat.c: Changes USER to SWAT_USER.
This commit is contained in:
parent
24b2bf1741
commit
4c2b5a0098
@ -440,7 +440,7 @@ revert:
|
||||
@$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
|
||||
|
||||
installman:
|
||||
@$(SHELL) $(srcdir)/script/installman.sh $(MANDIR) $(srcdir)
|
||||
@$(SHELL) $(srcdir)/script/installman.sh $(MANDIR) $(srcdir) @ROFF@
|
||||
|
||||
uninstall: uninstallman uninstallbin uninstallscripts uninstallcp
|
||||
|
||||
|
@ -970,7 +970,7 @@ static int skip_file(int skipsize)
|
||||
static int get_file(file_info2 finfo)
|
||||
{
|
||||
int fsize = finfo.size;
|
||||
int fnum, pos = 0, dsize = 0, rsize = 0, bpos = 0;
|
||||
int fnum = -1, pos = 0, dsize = 0, rsize = 0, bpos = 0;
|
||||
|
||||
DEBUG(5, ("get_file: file: %s, size %i\n", finfo.name, fsize));
|
||||
|
||||
|
1179
source/configure
vendored
1179
source/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(include/includes.h)
|
||||
AC_CONFIG_HEADER(include/config.h)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
dnl Unique-to-Samba variables we'll be playing with.
|
||||
AC_SUBST(SHELL)
|
||||
AC_SUBST(MPROGS)
|
||||
AC_SUBST(LDSHFLAGS)
|
||||
@ -12,72 +10,15 @@ AC_SUBST(HOST_OS)
|
||||
AC_SUBST(WRAP)
|
||||
AC_SUBST(WRAP32)
|
||||
AC_SUBST(PICFLAG)
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_AWK
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_VALIDATE_CACHE_SYSTEM_TYPE
|
||||
SAMBA_MAINTAINER_MODE
|
||||
|
||||
|
||||
|
||||
# this bit needs to be modified for each OS that is suported by
|
||||
# smbwrapper. You need to specify how to created a shared library and
|
||||
# how to compile C code to produce PIC object files
|
||||
|
||||
# these are the defaults, good for lots of systems
|
||||
HOST_OS="$host_os"
|
||||
LDSHFLAGS="-shared"
|
||||
|
||||
# and these are for particular systems
|
||||
case "$host_os" in
|
||||
*linux*) AC_DEFINE(LINUX);;
|
||||
*solaris*) AC_DEFINE(SUNOS5)
|
||||
LDSHFLAGS="-G"
|
||||
;;
|
||||
*sunos*) AC_DEFINE(SUNOS4)
|
||||
LDSHFLAGS=""
|
||||
;;
|
||||
*bsd*) LDSHFLAGS="-shared -Bshareable"
|
||||
;;
|
||||
*irix*) AC_DEFINE(IRIX)
|
||||
WRAP32=bin/smbwrapper.32.so
|
||||
;;
|
||||
*aix*) AC_DEFINE(AIX);;
|
||||
*hpux*) AC_DEFINE(HPUX);;
|
||||
*qnx*) AC_DEFINE(QNX);;
|
||||
*osf*) AC_DEFINE(OSF1);;
|
||||
*sco*) AC_DEFINE(SCO);;
|
||||
*next2*) AC_DEFINE(NEXT2);;
|
||||
esac
|
||||
|
||||
|
||||
# try to work out how to produce pic code with this compiler
|
||||
PICFLAG=""
|
||||
AC_PROG_CC_FLAG(fpic)
|
||||
if test $ac_cv_prog_cc_fpic = yes; then
|
||||
PICFLAG="-fpic";
|
||||
fi
|
||||
if test x$PICFLAG = x; then
|
||||
AC_PROG_CC_FLAG(Kpic)
|
||||
if test $ac_cv_prog_cc_Kpic = yes; then
|
||||
PICFLAG="-Kpic";
|
||||
fi
|
||||
fi
|
||||
if test x$PICFLAG = x; then
|
||||
AC_PROG_CC_FLAG(KPIC)
|
||||
if test $ac_cv_prog_cc_KPIC = yes; then
|
||||
PICFLAG="-KPIC";
|
||||
fi
|
||||
fi
|
||||
|
||||
# we can only support smbsh and smbwrapper if we can produce PIC code
|
||||
if test x$PICFLAG = x; then
|
||||
echo No support for PIC code - disabling smbwrapper and smbsh
|
||||
WRAP=""
|
||||
else
|
||||
WRAP="bin/smbsh bin/smbwrapper.so"
|
||||
fi
|
||||
|
||||
AC_INLINE
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_DIRENT
|
||||
@ -85,7 +26,7 @@ AC_HEADER_TIME
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h)
|
||||
AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h)
|
||||
AC_CHECK_HEADERS(compat.h rpc/types.h rpc/xdr.h rpc/auth.h rpc/clnt.h)
|
||||
AC_CHECK_HEADERS(compat.h rpc/rpc.h rpc/types.h rpc/xdr.h rpc/auth.h rpc/clnt.h)
|
||||
AC_CHECK_HEADERS(rpcsvc/yp_prot.h rpcsvc/ypclnt.h sys/param.h ctype.h )
|
||||
AC_CHECK_HEADERS(sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h)
|
||||
AC_CHECK_HEADERS(sys/filio.h string.h strings.h stdlib.h sys/socket.h)
|
||||
@ -227,6 +168,8 @@ AC_CHECK_FUNCS(setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64)
|
||||
AC_CHECK_FUNCS(set_auth_parameters atexit grantpt getspnam dup2 lseek64 ftruncate64)
|
||||
AC_CHECK_FUNCS(fseek64 ftell64 bigcrypt getprpwnam setluid yp_get_default_domain getpwanam)
|
||||
AC_CHECK_FUNCS(srandom random srand rand setenv)
|
||||
# syscall() is needed for smbwrapper.
|
||||
AC_CHECK_FUNCS(syscall)
|
||||
|
||||
AC_CHECK_FUNCS(_dup _dup2 _opendir _readdir _seekdir _telldir _closedir)
|
||||
AC_CHECK_FUNCS(__dup __dup2 __opendir __readdir __seekdir __telldir __closedir)
|
||||
@ -243,6 +186,71 @@ AC_CHECK_FUNCS(pread _pread __pread pread64 _pread64 __pread64)
|
||||
AC_CHECK_FUNCS(pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64)
|
||||
AC_CHECK_FUNCS(open64 _open64 __open64 creat64)
|
||||
|
||||
# this bit needs to be modified for each OS that is suported by
|
||||
# smbwrapper. You need to specify how to created a shared library and
|
||||
# how to compile C code to produce PIC object files
|
||||
|
||||
# these are the defaults, good for lots of systems
|
||||
HOST_OS="$host_os"
|
||||
LDSHFLAGS="-shared"
|
||||
|
||||
# and these are for particular systems
|
||||
case "$host_os" in
|
||||
*linux*) AC_DEFINE(LINUX);;
|
||||
*solaris*) AC_DEFINE(SUNOS5)
|
||||
LDSHFLAGS="-G"
|
||||
;;
|
||||
*sunos*) AC_DEFINE(SUNOS4)
|
||||
LDSHFLAGS=""
|
||||
;;
|
||||
*bsd*) LDSHFLAGS="-shared -Bshareable"
|
||||
;;
|
||||
*irix*) AC_DEFINE(IRIX)
|
||||
WRAP32=bin/smbwrapper.32.so
|
||||
;;
|
||||
*aix*) AC_DEFINE(AIX);;
|
||||
*hpux*) AC_DEFINE(HPUX);;
|
||||
*qnx*) AC_DEFINE(QNX);;
|
||||
*osf*) AC_DEFINE(OSF1);;
|
||||
*sco*) AC_DEFINE(SCO);;
|
||||
*next2*) AC_DEFINE(NEXT2);;
|
||||
*dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]);;
|
||||
*sysv4.2*) AC_CHECK_LIB(resolv, strcasecmp);;
|
||||
esac
|
||||
|
||||
# try to work out how to produce pic code with this compiler
|
||||
PICFLAG=""
|
||||
AC_PROG_CC_FLAG(fpic)
|
||||
if test $ac_cv_prog_cc_fpic = yes; then
|
||||
PICFLAG="-fpic";
|
||||
fi
|
||||
if test x$PICFLAG = x; then
|
||||
AC_PROG_CC_FLAG(Kpic)
|
||||
if test $ac_cv_prog_cc_Kpic = yes; then
|
||||
PICFLAG="-Kpic";
|
||||
fi
|
||||
fi
|
||||
if test x$PICFLAG = x; then
|
||||
AC_PROG_CC_FLAG(KPIC)
|
||||
if test $ac_cv_prog_cc_KPIC = yes; then
|
||||
PICFLAG="-KPIC";
|
||||
fi
|
||||
fi
|
||||
|
||||
WRAP="bin/smbsh bin/smbwrapper.so"
|
||||
|
||||
# Conditions under which smbwrapper should not be built.
|
||||
|
||||
if test x$PICFLAG = x; then
|
||||
echo No support for PIC code - disabling smbwrapper and smbsh
|
||||
WRAP=""
|
||||
elif test x$ac_cv_func_syscall = xno; then
|
||||
AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh])
|
||||
WRAP=""
|
||||
fi
|
||||
|
||||
################
|
||||
|
||||
AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }],
|
||||
|
@ -170,7 +170,7 @@ static BOOL user_is_member(char *user_name, LOCAL_GRP_MEMBER *mem, int num_mem)
|
||||
{
|
||||
int i;
|
||||
pstring name;
|
||||
snprintf(name, sizeof(name), "\\%s\\%s", global_sam_name, user_name);
|
||||
slprintf(name, sizeof(name)-1, "\\%s\\%s", global_sam_name, user_name);
|
||||
|
||||
for (i = 0; i < num_mem; i++)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ static BOOL make_alias_line(char *p, int max_len,
|
||||
{
|
||||
int i;
|
||||
int len;
|
||||
len = snprintf(p, max_len, "%s:%s:%d:", als->name, als->comment, als->rid);
|
||||
len = slprintf(p, max_len-1, "%s:%s:%d:", als->name, als->comment, als->rid);
|
||||
|
||||
if (len == -1)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ static BOOL make_group_line(char *p, int max_len,
|
||||
{
|
||||
int i;
|
||||
int len;
|
||||
len = snprintf(p, max_len, "%s:%s:%d:", grp->name, grp->comment, grp->rid);
|
||||
len = slprintf(p, max_len-1, "%s:%s:%d:", grp->name, grp->comment, grp->rid);
|
||||
|
||||
if (len == -1)
|
||||
{
|
||||
|
@ -563,6 +563,9 @@
|
||||
/* Define if you have the strpbrk function. */
|
||||
#undef HAVE_STRPBRK
|
||||
|
||||
/* Define if you have the syscall function. */
|
||||
#undef HAVE_SYSCALL
|
||||
|
||||
/* Define if you have the utime function. */
|
||||
#undef HAVE_UTIME
|
||||
|
||||
@ -629,6 +632,9 @@
|
||||
/* Define if you have the <rpc/clnt.h> header file. */
|
||||
#undef HAVE_RPC_CLNT_H
|
||||
|
||||
/* Define if you have the <rpc/rpc.h> header file. */
|
||||
#undef HAVE_RPC_RPC_H
|
||||
|
||||
/* Define if you have the <rpc/types.h> header file. */
|
||||
#undef HAVE_RPC_TYPES_H
|
||||
|
||||
|
@ -586,9 +586,17 @@ union semun {
|
||||
#define HAVE_NETGROUP 1
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_NETGROUP) && defined(HAVE_RPCSVC_YPCLNT_H)
|
||||
#include "rpcsvc/ypclnt.h"
|
||||
#if defined (HAVE_NETGROUP)
|
||||
#if defined(HAVE_RPC_RPC_H)
|
||||
#include <rpc/rpc.h>
|
||||
#endif
|
||||
#if defined(HAVE_RPCSVC_YP_PROT_H)
|
||||
#include <rpcsvc/yp_prot.h>
|
||||
#endif
|
||||
#if defined(HAVE_RPCSVC_YPCLNT_H)
|
||||
#include <rpcsvc/ypclnt.h>
|
||||
#endif
|
||||
#endif /* HAVE_NETGROUP */
|
||||
|
||||
#ifndef ALLOW_CHANGE_PASSWORD
|
||||
#if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
|
||||
|
@ -2217,7 +2217,7 @@ void display_sam_user_info_21(FILE *out_hnd, enum action_type action, SAM_USER_I
|
||||
char *get_sec_mask_str(uint32 type);
|
||||
void display_sec_access(FILE *out_hnd, enum action_type action, SEC_ACCESS *info);
|
||||
void display_sec_ace(FILE *out_hnd, enum action_type action, SEC_ACE *ace);
|
||||
void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *acl);
|
||||
void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *sec_acl);
|
||||
void display_sec_desc(FILE *out_hnd, enum action_type action, SEC_DESC *sec);
|
||||
char *get_reg_val_type_str(uint32 type);
|
||||
void display_reg_value_info(FILE *out_hnd, enum action_type action,
|
||||
|
@ -1654,8 +1654,11 @@ extern int unix_ERR_code;
|
||||
/* zero a structure */
|
||||
#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
|
||||
|
||||
/* zero a structure given a pointer to the structure - no zero check */
|
||||
#define ZERO_STRUCTPN(x) memset((char *)(x), 0, sizeof(*(x)))
|
||||
|
||||
/* zero a structure given a pointer to the structure */
|
||||
#define ZERO_STRUCTP(x) { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); }
|
||||
#define ZERO_STRUCTP(x) { if ((x) != NULL) ZERO_STRUCTPN(x); }
|
||||
|
||||
/* zero an array - note that sizeof(array) must work - ie. it must not be a
|
||||
pointer */
|
||||
|
@ -168,7 +168,7 @@ void close_sockets(void )
|
||||
#endif /* WITH_SSL */
|
||||
|
||||
close(Client);
|
||||
Client = 0;
|
||||
Client = -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,7 +137,7 @@ static BOOL ldap_search_one_user_by_uid(LDAP *ldap_struct, int uid, LDAPMessage
|
||||
{
|
||||
pstring filter;
|
||||
|
||||
snprintf(filter, sizeof(pstring), "uidAccount = %d", uid);
|
||||
slprintf(filter, sizeof(pstring)-1, "uidAccount = %d", uid);
|
||||
|
||||
if ( !ldap_search_one_user(ldap_struct, filter, result) )
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ BOOL do_lsa_lookup_sids(struct cli_state *cli,
|
||||
fstrcpy(dom_name, unistr2(ref.ref_dom[dom_idx].uni_dom_name.buffer));
|
||||
fstrcpy(name , unistr2(t_names.uni_name[i].buffer));
|
||||
|
||||
snprintf(full_name, sizeof(full_name), "\\%s\\%s",
|
||||
slprintf(full_name, sizeof(full_name)-1, "\\%s\\%s",
|
||||
dom_name, name);
|
||||
|
||||
(*names)[i] = strdup(full_name);
|
||||
|
@ -619,7 +619,7 @@ BOOL rpc_api_pipe_req(struct cli_state *cli, uint8 op_num,
|
||||
BOOL ret;
|
||||
BOOL auth_verify;
|
||||
BOOL auth_seal;
|
||||
uint32 crc32;
|
||||
uint32 crc32 = 0;
|
||||
|
||||
auth_verify = IS_BITS_SET_ALL(cli->ntlmssp_srv_flgs, NTLMSSP_NEGOTIATE_SIGN);
|
||||
auth_seal = IS_BITS_SET_ALL(cli->ntlmssp_srv_flgs, NTLMSSP_NEGOTIATE_SEAL);
|
||||
|
@ -162,7 +162,7 @@ void sec_io_acl(char *desc, SEC_ACL *t, prs_struct *ps, int depth)
|
||||
for (i = 0; i < MIN(t->num_aces, MAX_SEC_ACES); i++)
|
||||
{
|
||||
fstring tmp;
|
||||
snprintf(tmp, sizeof(tmp), "ace[%02d]: ", i);
|
||||
slprintf(tmp, sizeof(tmp)-1, "ace[%02d]: ", i);
|
||||
sec_io_ace(tmp, &t->ace[i], ps, depth);
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ BOOL create_rpc_reply(pipes_struct *p,
|
||||
|
||||
if (auth_len > 0)
|
||||
{
|
||||
uint32 crc32;
|
||||
uint32 crc32 = 0;
|
||||
|
||||
DEBUG(5,("create_rpc_reply: sign: %s seal: %s data %d auth %d\n",
|
||||
BOOLSTR(auth_verify), BOOLSTR(auth_seal), data_len, auth_len));
|
||||
@ -531,7 +531,7 @@ static BOOL api_pipe_auth_process(pipes_struct *p, prs_struct *pd)
|
||||
int data_len;
|
||||
int auth_len;
|
||||
uint32 old_offset;
|
||||
uint32 crc32;
|
||||
uint32 crc32 = 0;
|
||||
|
||||
auth_len = p->hdr.auth_len;
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ char *get_sec_mask_str(uint32 type)
|
||||
if (type != 0)
|
||||
{
|
||||
fstring tmp;
|
||||
snprintf(tmp, sizeof(tmp), "[%08x]", type);
|
||||
slprintf(tmp, sizeof(tmp)-1, "[%08x]", type);
|
||||
fstrcat(typestr, tmp);
|
||||
}
|
||||
|
||||
@ -1132,28 +1132,28 @@ void display_sec_ace(FILE *out_hnd, enum action_type action, SEC_ACE *ace)
|
||||
/****************************************************************************
|
||||
display sec_acl structure
|
||||
****************************************************************************/
|
||||
void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *acl)
|
||||
void display_sec_acl(FILE *out_hnd, enum action_type action, SEC_ACL *sec_acl)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_HEADER:
|
||||
{
|
||||
fprintf(out_hnd, "\tACL\tNum ACEs:\t%d\trevision:\t%x\n",
|
||||
acl->num_aces, acl->revision);
|
||||
sec_acl->num_aces, sec_acl->revision);
|
||||
fprintf(out_hnd, "\t---\n");
|
||||
|
||||
break;
|
||||
}
|
||||
case ACTION_ENUMERATE:
|
||||
{
|
||||
if (acl->size != 0 && acl->num_aces != 0)
|
||||
if (sec_acl->size != 0 && sec_acl->num_aces != 0)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < acl->num_aces; i++)
|
||||
for (i = 0; i < sec_acl->num_aces; i++)
|
||||
{
|
||||
display_sec_ace(out_hnd, ACTION_HEADER , &acl->ace[i]);
|
||||
display_sec_ace(out_hnd, ACTION_ENUMERATE, &acl->ace[i]);
|
||||
display_sec_ace(out_hnd, ACTION_FOOTER , &acl->ace[i]);
|
||||
display_sec_ace(out_hnd, ACTION_HEADER , &sec_acl->ace[i]);
|
||||
display_sec_ace(out_hnd, ACTION_ENUMERATE, &sec_acl->ace[i]);
|
||||
display_sec_ace(out_hnd, ACTION_FOOTER , &sec_acl->ace[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1256,7 +1256,7 @@ char *get_reg_val_type_str(uint32 type)
|
||||
break;
|
||||
}
|
||||
}
|
||||
snprintf(typestr, sizeof(typestr), "[%d]", type);
|
||||
slprintf(typestr, sizeof(typestr)-1, "[%d]", type);
|
||||
return typestr;
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,9 @@
|
||||
|
||||
MANDIR=$1
|
||||
SRCDIR=$2/
|
||||
if [ $# -ge 3 ] ; then
|
||||
GROFF=$3 # sh cmd line, including options
|
||||
fi
|
||||
|
||||
echo Installing man pages in $MANDIR
|
||||
|
||||
@ -20,9 +23,24 @@ for sect in 1 5 7 8 ; do
|
||||
for m in $MANDIR/man$sect ; do
|
||||
for s in $SRCDIR../docs/manpages/*$sect; do
|
||||
FNAME=$m/`basename $s`
|
||||
echo Installing $FNAME
|
||||
cp $s $m || echo Cannot create $FNAME... does $USER have privileges?
|
||||
chmod 0644 $FNAME
|
||||
|
||||
# Test for writability. Involves
|
||||
# blowing away existing files.
|
||||
|
||||
if (rm -f $FNAME && touch $FNAME); then
|
||||
rm $FNAME
|
||||
if [ ! "$GROFF" ] ; then
|
||||
cp $s $m # Copy raw nroff
|
||||
else
|
||||
echo "\t$FNAME" # groff'ing can be slow, give the user
|
||||
# a warm fuzzy.
|
||||
$GROFF $s > $FNAME # Process nroff, because man(1) (on
|
||||
# this system) doesn't .
|
||||
fi
|
||||
chmod 0644 $FNAME
|
||||
else
|
||||
echo Cannot create $FNAME... does $USER have privileges?
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
|
@ -739,7 +739,7 @@ void open_file_shared(files_struct *fsp,connection_struct *conn,char *fname,int
|
||||
fsp->fd_ptr = 0;
|
||||
|
||||
DEBUG(10,("open_file_shared: fname = %s, share_mode = %x, ofun = %x, mode = %o, oplock request = %d\n",
|
||||
fname, share_mode, ofun, mode, oplock_request ));
|
||||
fname, share_mode, ofun, (int)mode, oplock_request ));
|
||||
|
||||
/* this is for OS/2 EAs - try and say we don't support them */
|
||||
if (strstr(fname,".+,;=[]."))
|
||||
|
@ -220,7 +220,7 @@ dev = %x, inode = %.0f\n", (unsigned int)dev, (double)inode ));
|
||||
/* Validate message from address (must be localhost). */
|
||||
if(from.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) {
|
||||
DEBUG(0,("receive_local_message: invalid 'from' address \
|
||||
(was %x should be 127.0.0.1\n", from.sin_addr.s_addr));
|
||||
(was %lx should be 127.0.0.1\n", (long)from.sin_addr.s_addr));
|
||||
return False;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ static BOOL demo_mode = False;
|
||||
/*
|
||||
* Password Management Globals
|
||||
*/
|
||||
#define USER "username"
|
||||
#define SWAT_USER "username"
|
||||
#define OLD_PSWD "old_passwd"
|
||||
#define NEW_PSWD "new_passwd"
|
||||
#define NEW2_PSWD "new2_passwd"
|
||||
@ -627,7 +627,7 @@ static void chg_passwd(void)
|
||||
BOOL rslt;
|
||||
|
||||
/* Make sure users name has been specified */
|
||||
if (strlen(cgi_variable(USER)) == 0) {
|
||||
if (strlen(cgi_variable(SWAT_USER)) == 0) {
|
||||
printf("<p> Must specify \"User Name\" \n");
|
||||
return;
|
||||
}
|
||||
@ -676,7 +676,7 @@ static void chg_passwd(void)
|
||||
host = "127.0.0.1";
|
||||
}
|
||||
rslt = change_password(host,
|
||||
cgi_variable(USER),
|
||||
cgi_variable(SWAT_USER),
|
||||
cgi_variable(OLD_PSWD), cgi_variable(NEW_PSWD),
|
||||
cgi_variable(ADD_USER_FLAG)? True : False,
|
||||
cgi_variable(ENABLE_USER_FLAG)? True : False,
|
||||
@ -684,9 +684,9 @@ static void chg_passwd(void)
|
||||
|
||||
|
||||
if (rslt == True) {
|
||||
printf("<p> The passwd for '%s' has been changed. \n", cgi_variable(USER));
|
||||
printf("<p> The passwd for '%s' has been changed. \n", cgi_variable(SWAT_USER));
|
||||
} else {
|
||||
printf("<p> The passwd for '%s' has NOT been changed. \n",cgi_variable(USER));
|
||||
printf("<p> The passwd for '%s' has NOT been changed. \n",cgi_variable(SWAT_USER));
|
||||
}
|
||||
|
||||
return;
|
||||
@ -703,8 +703,8 @@ static void passwd_page(void)
|
||||
* After the first time through here be nice. If the user
|
||||
* changed the User box text to another users name, remember it.
|
||||
*/
|
||||
if (cgi_variable(USER)) {
|
||||
new_name = cgi_variable(USER);
|
||||
if (cgi_variable(SWAT_USER)) {
|
||||
new_name = cgi_variable(SWAT_USER);
|
||||
}
|
||||
|
||||
if (!new_name) new_name = "";
|
||||
@ -719,7 +719,7 @@ static void passwd_page(void)
|
||||
* Create all the dialog boxes for data collection
|
||||
*/
|
||||
printf("<tr><td> User Name : </td>\n");
|
||||
printf("<td><input type=text size=30 name=%s value=%s></td></tr> \n", USER, new_name);
|
||||
printf("<td><input type=text size=30 name=%s value=%s></td></tr> \n", SWAT_USER, new_name);
|
||||
if (am_root() == False) {
|
||||
printf("<tr><td> Old Password : </td>\n");
|
||||
printf("<td><input type=password size=30 name=%s></td></tr> \n",OLD_PSWD);
|
||||
@ -762,7 +762,7 @@ static void passwd_page(void)
|
||||
* Create all the dialog boxes for data collection
|
||||
*/
|
||||
printf("<tr><td> User Name : </td>\n");
|
||||
printf("<td><input type=text size=30 name=%s value=%s></td></tr>\n",USER, new_name);
|
||||
printf("<td><input type=text size=30 name=%s value=%s></td></tr>\n",SWAT_USER, new_name);
|
||||
printf("<tr><td> Old Password : </td>\n");
|
||||
printf("<td><input type=password size=30 name=%s></td></tr>\n",OLD_PSWD);
|
||||
printf("<tr><td> New Password : </td>\n");
|
||||
|
Loading…
Reference in New Issue
Block a user