mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
MFC
This commit is contained in:
commit
49f5aeaf41
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/largeSMP/; revision=223106
@ -70,6 +70,7 @@ void pmem(KINFO *, VARENT *);
|
||||
void pri(KINFO *, VARENT *);
|
||||
void printheader(void);
|
||||
void priorityr(KINFO *, VARENT *);
|
||||
void egroupname(KINFO *, VARENT *);
|
||||
void rgroupname(KINFO *, VARENT *);
|
||||
void runame(KINFO *, VARENT *);
|
||||
void rvar(KINFO *, VARENT *);
|
||||
@ -78,6 +79,7 @@ int s_cputime(KINFO *);
|
||||
int s_label(KINFO *);
|
||||
int s_loginclass(KINFO *);
|
||||
int s_logname(KINFO *);
|
||||
int s_egroupname(KINFO *);
|
||||
int s_rgroupname(KINFO *);
|
||||
int s_runame(KINFO *);
|
||||
int s_systime(KINFO *);
|
||||
|
@ -88,12 +88,19 @@ static VAR var[] = {
|
||||
{"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d",
|
||||
0},
|
||||
{"cputime", "", "time", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
|
||||
{"egid", "", "gid", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
|
||||
{"egroup", "", "group", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
|
||||
{"emul", "EMUL", NULL, LJUST, emulname, NULL, EMULLEN, 0, CHAR,
|
||||
NULL, 0},
|
||||
{"etime", "ELAPSED", NULL, USER, elapsed, NULL, 12, 0, CHAR, NULL, 0},
|
||||
{"etimes", "ELAPSED", NULL, USER, elapseds, NULL, 12, 0, CHAR, NULL, 0},
|
||||
{"euid", "", "uid", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
|
||||
{"f", "F", NULL, 0, kvar, NULL, 8, KOFF(ki_flag), INT, "x", 0},
|
||||
{"flags", "", "f", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
|
||||
{"gid", "GID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_groups),
|
||||
UINT, UIDFMT, 0},
|
||||
{"group", "GROUP", NULL, LJUST, egroupname, s_egroupname,
|
||||
USERLEN, 0, CHAR, NULL, 0},
|
||||
{"ignored", "", "sigignore", 0, NULL, NULL, 0, 0, CHAR, NULL, 0},
|
||||
{"inblk", "INBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_inblock), LONG,
|
||||
"ld", 0},
|
||||
|
@ -340,6 +340,22 @@ s_uname(KINFO *k)
|
||||
return (strlen(user_from_uid(k->ki_p->ki_uid, 0)));
|
||||
}
|
||||
|
||||
void
|
||||
egroupname(KINFO *k, VARENT *ve)
|
||||
{
|
||||
VAR *v;
|
||||
|
||||
v = ve->var;
|
||||
(void)printf("%-*s", v->width,
|
||||
group_from_gid(k->ki_p->ki_groups[0], 0));
|
||||
}
|
||||
|
||||
int
|
||||
s_egroupname(KINFO *k)
|
||||
{
|
||||
return (strlen(group_from_gid(k->ki_p->ki_groups[0], 0)));
|
||||
}
|
||||
|
||||
void
|
||||
rgroupname(KINFO *k, VARENT *ve)
|
||||
{
|
||||
|
11
bin/ps/ps.1
11
bin/ps/ps.1
@ -29,7 +29,7 @@
|
||||
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 18, 2011
|
||||
.Dd June 14, 2011
|
||||
.Dt PS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -502,6 +502,12 @@ elapsed running time, in decimal integer seconds
|
||||
.It Cm flags
|
||||
the process flags, in hexadecimal (alias
|
||||
.Cm f )
|
||||
.It Cm gid
|
||||
effective group ID (alias
|
||||
.Cm egid )
|
||||
.It Cm group
|
||||
group name (from egid) (alias
|
||||
.Cm egroup )
|
||||
.It Cm inblk
|
||||
total blocks read (alias
|
||||
.Cm inblock )
|
||||
@ -629,7 +635,8 @@ process pointer
|
||||
.It Cm ucomm
|
||||
name to be used for accounting
|
||||
.It Cm uid
|
||||
effective user ID
|
||||
effective user ID (alias
|
||||
.Cm euid )
|
||||
.It Cm upr
|
||||
scheduling priority on return from system call (alias
|
||||
.Cm usrpri )
|
||||
|
@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "mystring.h"
|
||||
#include "alias.h"
|
||||
#include "options.h" /* XXX for argptr (should remove?) */
|
||||
#include "builtins.h"
|
||||
|
||||
#define ATABSIZE 39
|
||||
|
||||
|
@ -43,5 +43,3 @@ struct alias {
|
||||
};
|
||||
|
||||
struct alias *lookupalias(const char *, int);
|
||||
int aliascmd(int, char **);
|
||||
int unaliascmd(int, char **);
|
||||
|
@ -36,4 +36,3 @@
|
||||
|
||||
arith_t arith(const char *);
|
||||
void arith_lex_reset(void);
|
||||
int expcmd(int, char **);
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "../mystring.h"
|
||||
#ifdef SHELL
|
||||
#include "../output.h"
|
||||
#include "builtins.h"
|
||||
#define FILE struct output
|
||||
#undef stdout
|
||||
#define stdout out1
|
||||
@ -75,7 +76,4 @@ pointer stalloc(int);
|
||||
void error(const char *, ...) __printf0like(1, 2);
|
||||
pid_t getjobpgrp(char *);
|
||||
|
||||
int echocmd(int, char **);
|
||||
int testcmd(int, char **);
|
||||
|
||||
extern char *commandname;
|
||||
|
@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "mystring.h"
|
||||
#include "show.h"
|
||||
#include "cd.h"
|
||||
#include "builtins.h"
|
||||
|
||||
static int cdlogical(char *);
|
||||
static int cdphysical(char *);
|
||||
|
@ -30,5 +30,3 @@
|
||||
*/
|
||||
|
||||
void pwd_init(int);
|
||||
int cdcmd (int, char **);
|
||||
int pwdcmd(int, char **);
|
||||
|
@ -51,19 +51,10 @@ struct backcmd { /* result of evalbackcmd */
|
||||
#define EV_TESTED 02 /* exit status is checked; ignore -e flag */
|
||||
#define EV_BACKCMD 04 /* command executing within back quotes */
|
||||
|
||||
int evalcmd(int, char **);
|
||||
void evalstring(char *, int);
|
||||
union node; /* BLETCH for ansi C */
|
||||
void evaltree(union node *, int);
|
||||
void evalbackcmd(union node *, struct backcmd *);
|
||||
int bltincmd(int, char **);
|
||||
int breakcmd(int, char **);
|
||||
int returncmd(int, char **);
|
||||
int falsecmd(int, char **);
|
||||
int truecmd(int, char **);
|
||||
int execcmd(int, char **);
|
||||
int timescmd(int, char **);
|
||||
int commandcmd(int, char **);
|
||||
|
||||
/* in_function returns nonzero if we are currently evaluating a function */
|
||||
#define in_function() funcnest
|
||||
|
@ -66,7 +66,6 @@ extern int exerrno; /* last exec error */
|
||||
|
||||
void shellexec(char **, char **, const char *, int) __dead2;
|
||||
char *padvance(const char **, const char *);
|
||||
int hashcmd(int, char **);
|
||||
void find_command(const char *, struct cmdentry *, int, const char *);
|
||||
int find_builtin(const char *, int *);
|
||||
void hashcd(void);
|
||||
@ -75,5 +74,4 @@ void addcmdentry(const char *, struct cmdentry *);
|
||||
void defun(const char *, union node *);
|
||||
int unsetfunc(const char *);
|
||||
int typecmd_impl(int, char **, int, const char *);
|
||||
int typecmd(int, char **);
|
||||
void clearcmdentry(void);
|
||||
|
@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "mystring.h"
|
||||
#include "arith.h"
|
||||
#include "show.h"
|
||||
#include "builtins.h"
|
||||
|
||||
/*
|
||||
* Structure specifying which parts of the string should be searched
|
||||
|
@ -63,4 +63,3 @@ void expari(int);
|
||||
int patmatch(const char *, const char *, int);
|
||||
void rmescapes(char *);
|
||||
int casematch(union node *, const char *);
|
||||
int wordexpcmd(int, char **);
|
||||
|
@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "error.h"
|
||||
#include "eval.h"
|
||||
#include "memalloc.h"
|
||||
#include "builtins.h"
|
||||
|
||||
#define MAXHISTLOOPS 4 /* max recursions through fc */
|
||||
#define DEFEDITOR "ed" /* default editor *should* be $EDITOR */
|
||||
|
@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "error.h"
|
||||
#include "mystring.h"
|
||||
#include "var.h"
|
||||
#include "builtins.h"
|
||||
|
||||
|
||||
static struct job *jobtab; /* array of jobs */
|
||||
|
@ -88,12 +88,7 @@ extern int in_dowait; /* are we in dowait()? */
|
||||
extern volatile sig_atomic_t breakwaitcmd; /* break wait to process traps? */
|
||||
|
||||
void setjobctl(int);
|
||||
int fgcmd(int, char **);
|
||||
int bgcmd(int, char **);
|
||||
int jobscmd(int, char **);
|
||||
void showjobs(int, int);
|
||||
int waitcmd(int, char **);
|
||||
int jobidcmd(int, char **);
|
||||
struct job *makejob(union node *, int);
|
||||
pid_t forkshell(struct job *, union node *, int);
|
||||
int waitforjob(struct job *, int *);
|
||||
|
@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "mystring.h"
|
||||
#include "exec.h"
|
||||
#include "cd.h"
|
||||
#include "builtins.h"
|
||||
|
||||
int rootpid;
|
||||
int rootshell;
|
||||
|
@ -39,5 +39,3 @@ extern struct jmploc main_handler; /* top level exception handler */
|
||||
|
||||
void readcmdfile(const char *);
|
||||
void cmdloop(int);
|
||||
int dotcmd(int, char **);
|
||||
int exitcmd(int, char **);
|
||||
|
@ -58,9 +58,7 @@ cat <<\!
|
||||
!
|
||||
awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \
|
||||
print $0}' builtins.def | sed 's/-[hj]//' > $temp
|
||||
awk '{ printf "int %s(int, char **);\n", $1}' $temp
|
||||
echo '
|
||||
int (*const builtinfunc[])(int, char **) = {'
|
||||
echo 'int (*const builtinfunc[])(int, char **) = {'
|
||||
awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp
|
||||
echo '};
|
||||
|
||||
@ -94,5 +92,7 @@ struct builtincmd {
|
||||
};
|
||||
|
||||
extern int (*const builtinfunc[])(int, char **);
|
||||
extern const struct builtincmd builtincmd[];'
|
||||
extern const struct builtincmd builtincmd[];
|
||||
'
|
||||
awk '{ printf "int %s(int, char **);\n", $1}' $temp
|
||||
rm -f $temp
|
||||
|
@ -39,8 +39,6 @@ extern int displayhist;
|
||||
void histedit(void);
|
||||
void sethistsize(const char *);
|
||||
void setterm(const char *);
|
||||
int histcmd(int, char **);
|
||||
int not_fcnumber(const char *);
|
||||
int str_to_event(const char *, int);
|
||||
int bindcmd(int, char **);
|
||||
|
||||
|
@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "memalloc.h"
|
||||
#include "error.h"
|
||||
#include "mystring.h"
|
||||
#include "builtins.h"
|
||||
#ifndef NO_HISTORY
|
||||
#include "myhistedit.h"
|
||||
#endif
|
||||
|
@ -108,8 +108,5 @@ void procargs(int, char **);
|
||||
void optschanged(void);
|
||||
void setparam(char **);
|
||||
void freeparam(struct shparam *);
|
||||
int shiftcmd(int, char **);
|
||||
int setcmd(int, char **);
|
||||
int getoptscmd(int, char **);
|
||||
int nextopt(const char *);
|
||||
void getoptsreset(const char *);
|
||||
|
@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "error.h"
|
||||
#include "trap.h"
|
||||
#include "mystring.h"
|
||||
#include "builtins.h"
|
||||
#include "myhistedit.h"
|
||||
|
||||
|
||||
|
@ -37,7 +37,6 @@ extern int pendingsigs;
|
||||
extern int in_dotrap;
|
||||
extern volatile sig_atomic_t gotwinch;
|
||||
|
||||
int trapcmd(int, char **);
|
||||
void clear_traps(void);
|
||||
int have_traps(void);
|
||||
void setsignal(int);
|
||||
|
@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "error.h"
|
||||
#include "mystring.h"
|
||||
#include "parser.h"
|
||||
#include "builtins.h"
|
||||
#ifndef NO_HISTORY
|
||||
#include "myhistedit.h"
|
||||
#endif
|
||||
|
@ -123,11 +123,7 @@ void updatecharset(void);
|
||||
void initcharset(void);
|
||||
char **environment(void);
|
||||
int showvarscmd(int, char **);
|
||||
int exportcmd(int, char **);
|
||||
int localcmd(int, char **);
|
||||
void mklocal(char *);
|
||||
void poplocalvars(void);
|
||||
int setvarcmd(int, char **);
|
||||
int unsetcmd(int, char **);
|
||||
int unsetvar(const char *);
|
||||
int setvarsafe(const char *, const char *, int);
|
||||
|
@ -27,7 +27,9 @@
|
||||
#include "target.h"
|
||||
#include "breakpoint.h"
|
||||
#include "value.h"
|
||||
#include "gdb_string.h"
|
||||
#include "osabi.h"
|
||||
#include "regset.h"
|
||||
|
||||
#include "ppc-tdep.h"
|
||||
#include "ppcfbsd-tdep.h"
|
||||
@ -80,6 +82,17 @@ ppcfbsd_supply_reg (char *regs, int regno)
|
||||
regcache_raw_supply (current_regcache, PC_REGNUM,
|
||||
regs + REG_PC_OFFSET);
|
||||
}
|
||||
static void
|
||||
ppcfbsd_supply_gregset (const struct regset *regset,
|
||||
struct regcache *regcache,
|
||||
int regnum, void *gregs, size_t size)
|
||||
{
|
||||
ppcfbsd_supply_reg (gregs, -1);
|
||||
}
|
||||
|
||||
static struct regset ppcfbsd_gregset = {
|
||||
NULL, (void*)ppcfbsd_supply_gregset
|
||||
};
|
||||
|
||||
void
|
||||
ppcfbsd_fill_reg (char *regs, int regno)
|
||||
@ -144,6 +157,20 @@ ppcfbsd_supply_fpreg (char *fpregs, int regno)
|
||||
fpregs + FPREG_FPSCR_OFFSET);
|
||||
}
|
||||
|
||||
static void
|
||||
ppcfbsd_supply_fpregset (const struct regset *regset,
|
||||
struct regcache * regcache,
|
||||
int regnum, void *fpset, size_t size)
|
||||
{
|
||||
ppcfbsd_supply_fpreg (fpset, -1);
|
||||
}
|
||||
|
||||
|
||||
static struct regset ppcfbsd_fpregset =
|
||||
{
|
||||
NULL, (void*)ppcfbsd_supply_fpregset
|
||||
};
|
||||
|
||||
void
|
||||
ppcfbsd_fill_fpreg (char *fpregs, int regno)
|
||||
{
|
||||
@ -174,69 +201,285 @@ ppcfbsd_fill_fpreg (char *fpregs, int regno)
|
||||
fpregs + FPREG_FPSCR_OFFSET);
|
||||
}
|
||||
|
||||
static void
|
||||
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
|
||||
CORE_ADDR ignore)
|
||||
/* Return the appropriate register set for the core section identified
|
||||
by SECT_NAME and SECT_SIZE. */
|
||||
|
||||
const struct regset *
|
||||
ppcfbsd_regset_from_core_section (struct gdbarch *gdbarch,
|
||||
const char *sect_name, size_t sect_size)
|
||||
{
|
||||
char *regs, *fpregs;
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
|
||||
/* We get everything from one section. */
|
||||
if (which != 0)
|
||||
return;
|
||||
if (strcmp (sect_name, ".reg") == 0 && sect_size >= SIZEOF_STRUCT_REG)
|
||||
return &ppcfbsd_gregset;
|
||||
|
||||
regs = core_reg_sect;
|
||||
fpregs = core_reg_sect + SIZEOF_STRUCT_REG;
|
||||
if (strcmp (sect_name, ".reg2") == 0 && sect_size >= SIZEOF_STRUCT_FPREG)
|
||||
return &ppcfbsd_fpregset;
|
||||
|
||||
/* Integer registers. */
|
||||
ppcfbsd_supply_reg (regs, -1);
|
||||
|
||||
/* Floating point registers. */
|
||||
ppcfbsd_supply_fpreg (fpregs, -1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size, int which,
|
||||
CORE_ADDR ignore)
|
||||
|
||||
/* Macros for matching instructions. Note that, since all the
|
||||
operands are masked off before they're or-ed into the instruction,
|
||||
you can use -1 to make masks. */
|
||||
|
||||
#define insn_d(opcd, rts, ra, d) \
|
||||
((((opcd) & 0x3f) << 26) \
|
||||
| (((rts) & 0x1f) << 21) \
|
||||
| (((ra) & 0x1f) << 16) \
|
||||
| ((d) & 0xffff))
|
||||
|
||||
#define insn_ds(opcd, rts, ra, d, xo) \
|
||||
((((opcd) & 0x3f) << 26) \
|
||||
| (((rts) & 0x1f) << 21) \
|
||||
| (((ra) & 0x1f) << 16) \
|
||||
| ((d) & 0xfffc) \
|
||||
| ((xo) & 0x3))
|
||||
|
||||
#define insn_xfx(opcd, rts, spr, xo) \
|
||||
((((opcd) & 0x3f) << 26) \
|
||||
| (((rts) & 0x1f) << 21) \
|
||||
| (((spr) & 0x1f) << 16) \
|
||||
| (((spr) & 0x3e0) << 6) \
|
||||
| (((xo) & 0x3ff) << 1))
|
||||
|
||||
/* Read a PPC instruction from memory. PPC instructions are always
|
||||
big-endian, no matter what endianness the program is running in, so
|
||||
we can't use read_memory_integer or one of its friends here. */
|
||||
static unsigned int
|
||||
read_insn (CORE_ADDR pc)
|
||||
{
|
||||
switch (which)
|
||||
unsigned char buf[4];
|
||||
|
||||
read_memory (pc, buf, 4);
|
||||
return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
|
||||
}
|
||||
|
||||
|
||||
/* An instruction to match. */
|
||||
struct insn_pattern
|
||||
{
|
||||
unsigned int mask; /* mask the insn with this... */
|
||||
unsigned int data; /* ...and see if it matches this. */
|
||||
int optional; /* If non-zero, this insn may be absent. */
|
||||
};
|
||||
|
||||
/* Return non-zero if the instructions at PC match the series
|
||||
described in PATTERN, or zero otherwise. PATTERN is an array of
|
||||
'struct insn_pattern' objects, terminated by an entry whose mask is
|
||||
zero.
|
||||
|
||||
When the match is successful, fill INSN[i] with what PATTERN[i]
|
||||
matched. If PATTERN[i] is optional, and the instruction wasn't
|
||||
present, set INSN[i] to 0 (which is not a valid PPC instruction).
|
||||
INSN should have as many elements as PATTERN. Note that, if
|
||||
PATTERN contains optional instructions which aren't present in
|
||||
memory, then INSN will have holes, so INSN[i] isn't necessarily the
|
||||
i'th instruction in memory. */
|
||||
static int
|
||||
insns_match_pattern (CORE_ADDR pc,
|
||||
struct insn_pattern *pattern,
|
||||
unsigned int *insn)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; pattern[i].mask; i++)
|
||||
{
|
||||
case 0: /* Integer registers. */
|
||||
if (core_reg_size != SIZEOF_STRUCT_REG)
|
||||
warning (_("Wrong size register set in core file."));
|
||||
insn[i] = read_insn (pc);
|
||||
if ((insn[i] & pattern[i].mask) == pattern[i].data)
|
||||
pc += 4;
|
||||
else if (pattern[i].optional)
|
||||
insn[i] = 0;
|
||||
else
|
||||
ppcfbsd_supply_reg (core_reg_sect, -1);
|
||||
break;
|
||||
|
||||
case 2: /* Floating point registers. */
|
||||
if (core_reg_size != SIZEOF_STRUCT_FPREG)
|
||||
warning (_("Wrong size FP register set in core file."));
|
||||
else
|
||||
ppcfbsd_supply_fpreg (core_reg_sect, -1);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Don't know what kind of register request this is; just ignore it. */
|
||||
break;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct core_fns ppcfbsd_core_fns =
|
||||
{
|
||||
bfd_target_unknown_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_core_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
|
||||
static struct core_fns ppcfbsd_elfcore_fns =
|
||||
/* Return the 'd' field of the d-form instruction INSN, properly
|
||||
sign-extended. */
|
||||
static CORE_ADDR
|
||||
insn_d_field (unsigned int insn)
|
||||
{
|
||||
bfd_target_elf_flavour, /* core_flavour */
|
||||
default_check_format, /* check_format */
|
||||
default_core_sniffer, /* core_sniffer */
|
||||
fetch_elfcore_registers, /* core_read_registers */
|
||||
NULL /* next */
|
||||
};
|
||||
return ((((CORE_ADDR) insn & 0xffff) ^ 0x8000) - 0x8000);
|
||||
}
|
||||
|
||||
|
||||
/* Return the 'ds' field of the ds-form instruction INSN, with the two
|
||||
zero bits concatenated at the right, and properly
|
||||
sign-extended. */
|
||||
static CORE_ADDR
|
||||
insn_ds_field (unsigned int insn)
|
||||
{
|
||||
return ((((CORE_ADDR) insn & 0xfffc) ^ 0x8000) - 0x8000);
|
||||
}
|
||||
|
||||
|
||||
/* If DESC is the address of a 64-bit PowerPC FreeBSD function
|
||||
descriptor, return the descriptor's entry point. */
|
||||
static CORE_ADDR
|
||||
ppc64_desc_entry_point (CORE_ADDR desc)
|
||||
{
|
||||
/* The first word of the descriptor is the entry point. */
|
||||
return (CORE_ADDR) read_memory_unsigned_integer (desc, 8);
|
||||
}
|
||||
|
||||
|
||||
/* Pattern for the standard linkage function. These are built by
|
||||
build_plt_stub in elf64-ppc.c, whose GLINK argument is always
|
||||
zero. */
|
||||
static struct insn_pattern ppc64_standard_linkage[] =
|
||||
{
|
||||
/* addis r12, r2, <any> */
|
||||
{ insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 },
|
||||
|
||||
/* std r2, 40(r1) */
|
||||
{ -1, insn_ds (62, 2, 1, 40, 0), 0 },
|
||||
|
||||
/* ld r11, <any>(r12) */
|
||||
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
|
||||
|
||||
/* addis r12, r12, 1 <optional> */
|
||||
{ insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 },
|
||||
|
||||
/* ld r2, <any>(r12) */
|
||||
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 },
|
||||
|
||||
/* addis r12, r12, 1 <optional> */
|
||||
{ insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 },
|
||||
|
||||
/* mtctr r11 */
|
||||
{ insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467),
|
||||
0 },
|
||||
|
||||
/* ld r11, <any>(r12) */
|
||||
{ insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
|
||||
|
||||
/* bctr */
|
||||
{ -1, 0x4e800420, 0 },
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
#define PPC64_STANDARD_LINKAGE_LEN \
|
||||
(sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0]))
|
||||
|
||||
/* When the dynamic linker is doing lazy symbol resolution, the first
|
||||
call to a function in another object will go like this:
|
||||
|
||||
- The user's function calls the linkage function:
|
||||
|
||||
100007c4: 4b ff fc d5 bl 10000498
|
||||
100007c8: e8 41 00 28 ld r2,40(r1)
|
||||
|
||||
- The linkage function loads the entry point (and other stuff) from
|
||||
the function descriptor in the PLT, and jumps to it:
|
||||
|
||||
10000498: 3d 82 00 00 addis r12,r2,0
|
||||
1000049c: f8 41 00 28 std r2,40(r1)
|
||||
100004a0: e9 6c 80 98 ld r11,-32616(r12)
|
||||
100004a4: e8 4c 80 a0 ld r2,-32608(r12)
|
||||
100004a8: 7d 69 03 a6 mtctr r11
|
||||
100004ac: e9 6c 80 a8 ld r11,-32600(r12)
|
||||
100004b0: 4e 80 04 20 bctr
|
||||
|
||||
- But since this is the first time that PLT entry has been used, it
|
||||
sends control to its glink entry. That loads the number of the
|
||||
PLT entry and jumps to the common glink0 code:
|
||||
|
||||
10000c98: 38 00 00 00 li r0,0
|
||||
10000c9c: 4b ff ff dc b 10000c78
|
||||
|
||||
- The common glink0 code then transfers control to the dynamic
|
||||
linker's fixup code:
|
||||
|
||||
10000c78: e8 41 00 28 ld r2,40(r1)
|
||||
10000c7c: 3d 82 00 00 addis r12,r2,0
|
||||
10000c80: e9 6c 80 80 ld r11,-32640(r12)
|
||||
10000c84: e8 4c 80 88 ld r2,-32632(r12)
|
||||
10000c88: 7d 69 03 a6 mtctr r11
|
||||
10000c8c: e9 6c 80 90 ld r11,-32624(r12)
|
||||
10000c90: 4e 80 04 20 bctr
|
||||
|
||||
Eventually, this code will figure out how to skip all of this,
|
||||
including the dynamic linker. At the moment, we just get through
|
||||
the linkage function. */
|
||||
|
||||
/* If the current thread is about to execute a series of instructions
|
||||
at PC matching the ppc64_standard_linkage pattern, and INSN is the result
|
||||
from that pattern match, return the code address to which the
|
||||
standard linkage function will send them. (This doesn't deal with
|
||||
dynamic linker lazy symbol resolution stubs.) */
|
||||
static CORE_ADDR
|
||||
ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
|
||||
|
||||
/* The address of the function descriptor this linkage function
|
||||
references. */
|
||||
CORE_ADDR desc
|
||||
= ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2)
|
||||
+ (insn_d_field (insn[0]) << 16)
|
||||
+ insn_ds_field (insn[2]));
|
||||
|
||||
/* The first word of the descriptor is the entry point. Return that. */
|
||||
return ppc64_desc_entry_point (desc);
|
||||
}
|
||||
|
||||
|
||||
/* Given that we've begun executing a call trampoline at PC, return
|
||||
the entry point of the function the trampoline will go to. */
|
||||
static CORE_ADDR
|
||||
ppc64_skip_trampoline_code (CORE_ADDR pc)
|
||||
{
|
||||
unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN];
|
||||
|
||||
if (insns_match_pattern (pc, ppc64_standard_linkage,
|
||||
ppc64_standard_linkage_insn))
|
||||
return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG) on PPC64
|
||||
GNU/Linux and FreeBSD.
|
||||
|
||||
Usually a function pointer's representation is simply the address
|
||||
of the function. On GNU/Linux on the 64-bit PowerPC however, a
|
||||
function pointer is represented by a pointer to a TOC entry. This
|
||||
TOC entry contains three words, the first word is the address of
|
||||
the function, the second word is the TOC pointer (r2), and the
|
||||
third word is the static chain value. Throughout GDB it is
|
||||
currently assumed that a function pointer contains the address of
|
||||
the function, which is not easy to fix. In addition, the
|
||||
conversion of a function address to a function pointer would
|
||||
require allocation of a TOC entry in the inferior's memory space,
|
||||
with all its drawbacks. To be able to call C++ virtual methods in
|
||||
the inferior (which are called via function pointers),
|
||||
find_function_addr uses this function to get the function address
|
||||
from a function pointer. */
|
||||
|
||||
/* If ADDR points at what is clearly a function descriptor, transform
|
||||
it into the address of the corresponding function. Be
|
||||
conservative, otherwize GDB will do the transformation on any
|
||||
random addresses such as occures when there is no symbol table. */
|
||||
|
||||
static CORE_ADDR
|
||||
ppc64_fbsd_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
|
||||
CORE_ADDR addr,
|
||||
struct target_ops *targ)
|
||||
{
|
||||
struct section_table *s = target_section_by_addr (targ, addr);
|
||||
|
||||
/* Check if ADDR points to a function descriptor. */
|
||||
if (s && strcmp (s->the_bfd_section->name, ".opd") == 0)
|
||||
return get_target_memory_unsigned (targ, addr, 8);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
static int
|
||||
ppcfbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
|
||||
@ -270,27 +513,42 @@ static void
|
||||
ppcfbsd_init_abi (struct gdbarch_info info,
|
||||
struct gdbarch *gdbarch)
|
||||
{
|
||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||
|
||||
/* FreeBSD doesn't support the 128-bit `long double' from the psABI. */
|
||||
set_gdbarch_long_double_bit (gdbarch, 64);
|
||||
|
||||
set_gdbarch_pc_in_sigtramp (gdbarch, ppcfbsd_pc_in_sigtramp);
|
||||
/* For NetBSD, this is an on again, off again thing. Some systems
|
||||
do use the broken struct convention, and some don't. */
|
||||
set_gdbarch_return_value (gdbarch, ppcfbsd_return_value);
|
||||
#ifdef __powerpc64__
|
||||
set_solib_svr4_fetch_link_map_offsets (gdbarch,
|
||||
svr4_lp64_fetch_link_map_offsets);
|
||||
#else
|
||||
set_solib_svr4_fetch_link_map_offsets (gdbarch,
|
||||
svr4_ilp32_fetch_link_map_offsets);
|
||||
#endif
|
||||
|
||||
if (tdep->wordsize == 4)
|
||||
{
|
||||
set_gdbarch_return_value (gdbarch, ppcfbsd_return_value);
|
||||
set_solib_svr4_fetch_link_map_offsets (gdbarch,
|
||||
svr4_ilp32_fetch_link_map_offsets);
|
||||
}
|
||||
|
||||
if (tdep->wordsize == 8)
|
||||
{
|
||||
set_gdbarch_convert_from_func_ptr_addr
|
||||
(gdbarch, ppc64_fbsd_convert_from_func_ptr_addr);
|
||||
|
||||
set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
|
||||
|
||||
set_solib_svr4_fetch_link_map_offsets (gdbarch,
|
||||
svr4_lp64_fetch_link_map_offsets);
|
||||
}
|
||||
|
||||
set_gdbarch_regset_from_core_section (gdbarch,
|
||||
ppcfbsd_regset_from_core_section);
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_ppcfbsd_tdep (void)
|
||||
{
|
||||
gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc,
|
||||
GDB_OSABI_FREEBSD_ELF, ppcfbsd_init_abi);
|
||||
gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64,
|
||||
GDB_OSABI_FREEBSD_ELF, ppcfbsd_init_abi);
|
||||
gdbarch_register_osabi (bfd_arch_rs6000, 0, GDB_OSABI_FREEBSD_ELF,
|
||||
ppcfbsd_init_abi);
|
||||
gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_FREEBSD_ELF,
|
||||
ppcfbsd_init_abi);
|
||||
|
||||
add_core_fns (&ppcfbsd_core_fns);
|
||||
add_core_fns (&ppcfbsd_elfcore_fns);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd November 20, 2002
|
||||
.Dd June 13, 2011
|
||||
.Dt PFCTL 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -35,7 +35,7 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm pfctl
|
||||
.Bk -words
|
||||
.Op Fl AdeghmNnOqRrvz
|
||||
.Op Fl AdeghmNnOPqRrvz
|
||||
.Op Fl a Ar anchor
|
||||
.Oo Fl D Ar macro Ns =
|
||||
.Ar value Oc
|
||||
@ -350,6 +350,9 @@ without any options will enable
|
||||
optimizations, and a second
|
||||
.Fl o
|
||||
will enable profiling.
|
||||
.It Fl P
|
||||
Do not perform service name lookup for port specific rules,
|
||||
instead display the ports numerically.
|
||||
.It Fl p Ar device
|
||||
Use the device file
|
||||
.Ar device
|
||||
@ -670,6 +673,7 @@ Passive operating system fingerprint database.
|
||||
.Xr pf.conf 5 ,
|
||||
.Xr pf.os 5 ,
|
||||
.Xr rc.conf 5 ,
|
||||
.Xr services 5 ,
|
||||
.Xr sysctl.conf 5 ,
|
||||
.Xr authpf 8 ,
|
||||
.Xr ftp-proxy 8 ,
|
||||
|
@ -235,7 +235,7 @@ usage(void)
|
||||
{
|
||||
extern char *__progname;
|
||||
|
||||
fprintf(stderr, "usage: %s [-AdeghmNnOqRrvz] ", __progname);
|
||||
fprintf(stderr, "usage: %s [-AdeghmNnOPqRrvz] ", __progname);
|
||||
fprintf(stderr, "[-a anchor] [-D macro=value] [-F modifier]\n");
|
||||
fprintf(stderr, "\t[-f file] [-i interface] [-K host | network] ");
|
||||
fprintf(stderr, "[-k host | network ]\n");
|
||||
@ -770,6 +770,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
|
||||
struct pfioc_rule pr;
|
||||
u_int32_t nr, mnr, header = 0;
|
||||
int rule_numbers = opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG);
|
||||
int numeric = opts & PF_OPT_NUMERIC;
|
||||
int len = strlen(path);
|
||||
int brace;
|
||||
char *p;
|
||||
@ -834,7 +835,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
|
||||
case PFCTL_SHOW_RULES:
|
||||
if (pr.rule.label[0] && (opts & PF_OPT_SHOWALL))
|
||||
labels = 1;
|
||||
print_rule(&pr.rule, pr.anchor_call, rule_numbers);
|
||||
print_rule(&pr.rule, pr.anchor_call, rule_numbers, numeric);
|
||||
printf("\n");
|
||||
pfctl_print_rule_counters(&pr.rule, opts);
|
||||
break;
|
||||
@ -894,7 +895,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format,
|
||||
} else
|
||||
p = &pr.anchor_call[0];
|
||||
|
||||
print_rule(&pr.rule, p, rule_numbers);
|
||||
print_rule(&pr.rule, p, rule_numbers, numeric);
|
||||
if (brace)
|
||||
printf(" {\n");
|
||||
else
|
||||
@ -951,7 +952,7 @@ pfctl_show_nat(int dev, int opts, char *anchorname)
|
||||
dotitle = 0;
|
||||
}
|
||||
print_rule(&pr.rule, pr.anchor_call,
|
||||
opts & PF_OPT_VERBOSE2);
|
||||
opts & PF_OPT_VERBOSE2, opts & PF_OPT_NUMERIC);
|
||||
printf("\n");
|
||||
pfctl_print_rule_counters(&pr.rule, opts);
|
||||
pfctl_clear_pool(&pr.rule.rpool);
|
||||
@ -1318,7 +1319,8 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pf_rule *r, int depth)
|
||||
if (pf->opts & PF_OPT_VERBOSE) {
|
||||
INDENT(depth, !(pf->opts & PF_OPT_VERBOSE2));
|
||||
print_rule(r, r->anchor ? r->anchor->name : "",
|
||||
pf->opts & PF_OPT_VERBOSE2);
|
||||
pf->opts & PF_OPT_VERBOSE2,
|
||||
pf->opts & PF_OPT_NUMERIC);
|
||||
}
|
||||
path[len] = '\0';
|
||||
pfctl_clear_pool(&r->rpool);
|
||||
@ -1978,7 +1980,7 @@ main(int argc, char *argv[])
|
||||
usage();
|
||||
|
||||
while ((ch = getopt(argc, argv,
|
||||
"a:AdD:eqf:F:ghi:k:K:mnNOo::p:rRs:t:T:vx:z")) != -1) {
|
||||
"a:AdD:eqf:F:ghi:k:K:mnNOo::Pp:rRs:t:T:vx:z")) != -1) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
anchoropt = optarg;
|
||||
@ -2080,6 +2082,9 @@ main(int argc, char *argv[])
|
||||
case 'p':
|
||||
pf_device = optarg;
|
||||
break;
|
||||
case 'P':
|
||||
opts |= PF_OPT_NUMERIC;
|
||||
break;
|
||||
case 's':
|
||||
showopt = pfctl_lookup_option(optarg, showopt_list);
|
||||
if (showopt == NULL) {
|
||||
|
@ -407,7 +407,7 @@ optimize_superblock(struct pfctl *pf, struct superblock *block)
|
||||
TAILQ_FOREACH(por, &block->sb_rules, por_entry) {
|
||||
printf(" ");
|
||||
print_rule(&por->por_rule, por->por_rule.anchor ?
|
||||
por->por_rule.anchor->name : "", 1);
|
||||
por->por_rule.anchor->name : "", 1, 0);
|
||||
}
|
||||
#endif /* OPT_DEBUG */
|
||||
|
||||
|
@ -64,11 +64,11 @@ __FBSDID("$FreeBSD$");
|
||||
#include "pfctl.h"
|
||||
|
||||
void print_op (u_int8_t, const char *, const char *);
|
||||
void print_port (u_int8_t, u_int16_t, u_int16_t, const char *);
|
||||
void print_port (u_int8_t, u_int16_t, u_int16_t, const char *, int);
|
||||
void print_ugid (u_int8_t, unsigned, unsigned, const char *, unsigned);
|
||||
void print_flags (u_int8_t);
|
||||
void print_fromto(struct pf_rule_addr *, pf_osfp_t,
|
||||
struct pf_rule_addr *, u_int8_t, u_int8_t, int);
|
||||
struct pf_rule_addr *, u_int8_t, u_int8_t, int, int);
|
||||
int ifa_skip_if(const char *filter, struct node_host *p);
|
||||
|
||||
struct node_host *ifa_grouplookup(const char *, int);
|
||||
@ -320,12 +320,15 @@ print_op(u_int8_t op, const char *a1, const char *a2)
|
||||
}
|
||||
|
||||
void
|
||||
print_port(u_int8_t op, u_int16_t p1, u_int16_t p2, const char *proto)
|
||||
print_port(u_int8_t op, u_int16_t p1, u_int16_t p2, const char *proto, int numeric)
|
||||
{
|
||||
char a1[6], a2[6];
|
||||
struct servent *s;
|
||||
|
||||
s = getservbyport(p1, proto);
|
||||
if (!numeric)
|
||||
s = getservbyport(p1, proto);
|
||||
else
|
||||
s = NULL;
|
||||
p1 = ntohs(p1);
|
||||
p2 = ntohs(p2);
|
||||
snprintf(a1, sizeof(a1), "%u", p1);
|
||||
@ -363,7 +366,7 @@ print_flags(u_int8_t f)
|
||||
|
||||
void
|
||||
print_fromto(struct pf_rule_addr *src, pf_osfp_t osfp, struct pf_rule_addr *dst,
|
||||
sa_family_t af, u_int8_t proto, int verbose)
|
||||
sa_family_t af, u_int8_t proto, int verbose, int numeric)
|
||||
{
|
||||
char buf[PF_OSFP_LEN*3];
|
||||
if (src->addr.type == PF_ADDR_ADDRMASK &&
|
||||
@ -384,7 +387,8 @@ print_fromto(struct pf_rule_addr *src, pf_osfp_t osfp, struct pf_rule_addr *dst,
|
||||
if (src->port_op)
|
||||
print_port(src->port_op, src->port[0],
|
||||
src->port[1],
|
||||
proto == IPPROTO_TCP ? "tcp" : "udp");
|
||||
proto == IPPROTO_TCP ? "tcp" : "udp",
|
||||
numeric);
|
||||
if (osfp != PF_OSFP_ANY)
|
||||
printf(" os \"%s\"", pfctl_lookup_fingerprint(osfp, buf,
|
||||
sizeof(buf)));
|
||||
@ -396,7 +400,8 @@ print_fromto(struct pf_rule_addr *src, pf_osfp_t osfp, struct pf_rule_addr *dst,
|
||||
if (dst->port_op)
|
||||
print_port(dst->port_op, dst->port[0],
|
||||
dst->port[1],
|
||||
proto == IPPROTO_TCP ? "tcp" : "udp");
|
||||
proto == IPPROTO_TCP ? "tcp" : "udp",
|
||||
numeric);
|
||||
}
|
||||
}
|
||||
|
||||
@ -673,7 +678,7 @@ print_src_node(struct pf_src_node *sn, int opts)
|
||||
}
|
||||
|
||||
void
|
||||
print_rule(struct pf_rule *r, const char *anchor_call, int verbose)
|
||||
print_rule(struct pf_rule *r, const char *anchor_call, int verbose, int numeric)
|
||||
{
|
||||
static const char *actiontypes[] = { "pass", "block", "scrub",
|
||||
"no scrub", "nat", "no nat", "binat", "no binat", "rdr", "no rdr" };
|
||||
@ -800,7 +805,7 @@ print_rule(struct pf_rule *r, const char *anchor_call, int verbose)
|
||||
printf(" proto %u", r->proto);
|
||||
}
|
||||
print_fromto(&r->src, r->os_fingerprint, &r->dst, r->af, r->proto,
|
||||
verbose);
|
||||
verbose, numeric);
|
||||
if (r->uid.op)
|
||||
print_ugid(r->uid.op, r->uid.uid[0], r->uid.uid[1], "user",
|
||||
UID_MAX);
|
||||
|
@ -48,6 +48,7 @@
|
||||
#define PF_OPT_DEBUG 0x0200
|
||||
#define PF_OPT_SHOWALL 0x0400
|
||||
#define PF_OPT_OPTIMIZE 0x0800
|
||||
#define PF_OPT_NUMERIC 0x1000
|
||||
#define PF_OPT_MERGE 0x2000
|
||||
#define PF_OPT_RECURSE 0x4000
|
||||
|
||||
@ -235,7 +236,7 @@ int pfctl_load_anchors(int, struct pfctl *, struct pfr_buffer *);
|
||||
|
||||
void print_pool(struct pf_pool *, u_int16_t, u_int16_t, sa_family_t, int);
|
||||
void print_src_node(struct pf_src_node *, int);
|
||||
void print_rule(struct pf_rule *, const char *, int);
|
||||
void print_rule(struct pf_rule *, const char *, int, int);
|
||||
void print_tabledef(const char *, int, int, struct node_tinithead *);
|
||||
void print_status(struct pf_status *, int);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: CACerts,v 8.4 2009/06/26 05:46:10 ca Exp $
|
||||
# $Id: CACerts,v 8.5 2011/05/06 23:05:10 ca Exp $
|
||||
# This file contains some CA certificates that are used to sign the
|
||||
# certificates of mail servers of members of the sendmail consortium
|
||||
# who may reply to questions etc sent to sendmail.org.
|
||||
@ -6,73 +6,6 @@
|
||||
# a certificate signed by one of these CA certificates.
|
||||
#
|
||||
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 0 (0x0)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=US, ST=Illinois, L=De Kalb, O=Northern Illinois University, OU=Computer Science, CN=Neil Rickert/emailAddress=rickert@cs.niu.edu
|
||||
Validity
|
||||
Not Before: May 12 00:40:50 2000 GMT
|
||||
Not After : May 20 00:40:50 2010 GMT
|
||||
Subject: C=US, ST=Illinois, L=De Kalb, O=Northern Illinois University, OU=Computer Science, CN=Neil Rickert/emailAddress=rickert@cs.niu.edu
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (1024 bit)
|
||||
Modulus (1024 bit):
|
||||
00:b1:1b:49:06:ef:3f:44:e0:93:ad:8c:a7:f7:21:
|
||||
7c:87:cb:da:35:f6:4b:a2:fd:8a:a0:07:5b:cc:6a:
|
||||
9b:89:33:fc:24:f5:b1:24:59:5a:25:50:fd:16:d7:
|
||||
d4:bc:c7:04:1d:df:90:9b:5e:c3:a8:e9:8b:7d:a3:
|
||||
5d:9a:e9:7f:e5:2b:ea:15:a7:ad:ba:58:26:0a:11:
|
||||
49:4f:da:9a:67:7f:b0:a6:66:f4:27:b6:61:4e:3c:
|
||||
c8:3e:a0:2f:6a:b4:0e:15:d6:39:f8:92:60:85:df:
|
||||
a6:34:f3:fa:a4:a5:e4:47:49:e7:87:a4:a5:5c:8e:
|
||||
6a:2f:13:76:5f:29:f3:64:73
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
B6:31:78:BB:7E:AA:4D:A1:5D:FD:A2:24:18:C6:90:5A:2D:2F:19:48
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:B6:31:78:BB:7E:AA:4D:A1:5D:FD:A2:24:18:C6:90:5A:2D:2F:19:48
|
||||
DirName:/C=US/ST=Illinois/L=De Kalb/O=Northern Illinois University/OU=Computer Science/CN=Neil Rickert/emailAddress=rickert@cs.niu.edu
|
||||
serial:00
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
60:69:23:65:97:51:5c:06:a4:42:cb:00:e7:9a:dc:39:70:c3:
|
||||
d3:5d:bf:0f:e0:04:54:4d:d9:dc:12:57:12:6c:67:fd:5b:b0:
|
||||
39:63:ea:c4:12:65:51:bb:3d:f1:f7:25:b4:cd:0b:f6:5b:7a:
|
||||
61:25:ad:06:0a:01:55:dc:71:05:29:0d:73:e9:30:51:be:d3:
|
||||
e1:b2:89:fc:0f:28:f7:06:75:96:1b:34:75:e0:07:e5:3b:b3:
|
||||
0b:28:24:e5:79:ea:55:39:e7:d2:ee:ec:63:b4:e4:c6:ee:cb:
|
||||
15:d0:c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A8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0RlIEthbGIxJTAjBgNV
|
||||
BAoTHE5vcnRoZXJuIElsbGlub2lzIFVuaXZlcnNpdHkxGTAXBgNVBAsTEENvbXB1
|
||||
dGVyIFNjaWVuY2UxFTATBgNVBAMTDE5laWwgUmlja2VydDEhMB8GCSqGSIb3DQEJ
|
||||
ARYScmlja2VydEBjcy5uaXUuZWR1ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcN
|
||||
AQEEBQADgYEAYGkjZZdRXAakQssA55rcOXDD012/D+AEVE3Z3BJXEmxn/VuwOWPq
|
||||
xBJlUbs98fcltM0L9lt6YSWtBgoBVdxxBSkNc+kwUb7T4bKJ/A8o9wZ1lhs0deAH
|
||||
5TuzCygk5XnqVTnn0u7sY7Tkxu7LFdDI6ztPNhCkasBrA+gpcsenEAA=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
|
@ -1,6 +1,6 @@
|
||||
$FreeBSD$
|
||||
|
||||
sendmail 8.14.4
|
||||
sendmail 8.14.5
|
||||
originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/
|
||||
|
||||
For the import of sendmail, the following directories were renamed:
|
||||
@ -110,4 +110,4 @@ infrastructure in FreeBSD:
|
||||
usr.sbin/mailwrapper/Makefile
|
||||
|
||||
gshapiro@FreeBSD.org
|
||||
25-January-2010
|
||||
13-June-2011
|
||||
|
@ -12,6 +12,14 @@ distribution).
|
||||
|
||||
This list is not guaranteed to be complete.
|
||||
|
||||
* Header values which are too long may be truncated.
|
||||
|
||||
If a value of a structured header is longer than 256 (MAXNAME)
|
||||
characters then it may be truncated during output. For example,
|
||||
if a single address in the To: header is longer than 256 characters
|
||||
then it will be truncated which may result in a syntactically
|
||||
invalid address.
|
||||
|
||||
* Delivery to programs that generate too much output may cause problems
|
||||
|
||||
If e-mail is delivered to a program which generates too much
|
||||
@ -258,4 +266,4 @@ Kresolve sequence dnsmx canon
|
||||
be used if set instead of LOCAL_RELAY ($R). This will be fixed in a
|
||||
future version.
|
||||
|
||||
$Revision: 8.60 $, Last updated $Date: 2007/12/04 01:16:50 $
|
||||
$Revision: 8.61 $, Last updated $Date: 2011/04/07 17:48:23 $
|
||||
|
@ -1,8 +1,9 @@
|
||||
SENDMAIL LICENSE
|
||||
|
||||
The following license terms and conditions apply, unless a different
|
||||
license is obtained from Sendmail, Inc., 6475 Christie Ave, Suite 350,
|
||||
Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com.
|
||||
The following license terms and conditions apply, unless a redistribution
|
||||
agreement or other license is obtained from Sendmail, Inc., 6475 Christie
|
||||
Ave, Third Floor, Emeryville, CA 94608, USA, or by electronic mail at
|
||||
license@sendmail.com.
|
||||
|
||||
License Terms:
|
||||
|
||||
@ -22,10 +23,11 @@ each of the following conditions is met:
|
||||
must allow further use, modification, and redistribution of the Source
|
||||
Code under substantially the same terms as this license. For the
|
||||
purposes of redistribution "Source Code" means the complete compilable
|
||||
and linkable source code of sendmail including all modifications.
|
||||
and linkable source code of sendmail and associated libraries and
|
||||
utilities in the sendmail distribution including all modifications.
|
||||
|
||||
2. Redistributions of source code must retain the copyright notices as they
|
||||
appear in each source code file, these license terms, and the
|
||||
2. Redistributions of Source Code must retain the copyright notices as they
|
||||
appear in each Source Code file, these license terms, and the
|
||||
disclaimer/limitation of liability set forth as paragraph 6 below.
|
||||
|
||||
3. Redistributions in binary form must reproduce the Copyright Notice,
|
||||
@ -33,16 +35,16 @@ each of the following conditions is met:
|
||||
forth as paragraph 6 below, in the documentation and/or other materials
|
||||
provided with the distribution. For the purposes of binary distribution
|
||||
the "Copyright Notice" refers to the following language:
|
||||
"Copyright (c) 1998-2009 Sendmail, Inc. All rights reserved."
|
||||
"Copyright (c) 1998-2010 Sendmail, Inc. All rights reserved."
|
||||
|
||||
4. Neither the name of Sendmail, Inc. nor the University of California nor
|
||||
the names of their contributors may be used to endorse or promote
|
||||
names of their contributors may be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission. The name "sendmail" is a trademark of Sendmail, Inc.
|
||||
|
||||
5. All redistributions must comply with the conditions imposed by the
|
||||
University of California on certain embedded code, whose copyright
|
||||
notice and conditions for redistribution are as follows:
|
||||
University of California on certain embedded code, which copyright
|
||||
Notice and conditions for redistribution are as follows:
|
||||
|
||||
(a) Copyright (c) 1988, 1993 The Regents of the University of
|
||||
California. All rights reserved.
|
||||
@ -76,4 +78,4 @@ each of the following conditions is met:
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
$Revision: 8.15 $, Last updated $Date: 2009/03/04 19:58:04 $
|
||||
$Revision: 8.17 $, Last updated $Date: 2010/12/03 01:10:00 $, Document 139848.1
|
||||
|
@ -141,6 +141,223 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0=
|
||||
=SR28
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
Type Bits KeyID Created Expires Algorithm Use
|
||||
pub 2048 A97884B0 2011-01-04 ------- RSA Sign & Encrypt
|
||||
fingerprint: 5872 6218 A913 400D E660 3601 39A4 C77D A978 84B0
|
||||
uid Sendmail Signing Key/2011 <sendmail@Sendmail.ORG>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.9 (OpenBSD)
|
||||
|
||||
mQENBE0ios4BCAC0mjr+Fljl/LRvhI3sI29bM146dWJFr+oJVTHuafDuKQS5ICeU
|
||||
89LewVL6Pjp8RureijfbqZC51Z2v5v6GxAizr/LlD9FohjQXiAaA1vgPChBdzvLg
|
||||
4TzEVnQOGFuDUnuucQH82I7ysQkK7z1GpFkofKHHgwmcfFpOiRLoUR7YVP7yDpfv
|
||||
Zx3EPvRoFtR22kWlhms49J7zgRpXUCH9ggrtcl1QCXkPOl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nWuR
|
||||
MKGu+n4hSU3SIYl6xLsdBGpiDOQJ3C1YHIduhDrQlyAjDVEgzgw20DUxUzKIpn2b
|
||||
KH6d5q94eHcPD56A4cYD275DIZzAYqRpwzmB9O845HrHAPmQ
|
||||
=pDAG
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
Type Bits KeyID Created Expires Algorithm Use
|
||||
pub 2048 85410ABE 2010-02-19 ------- RSA Sign
|
||||
fingerprint: B175 9644 5303 5DCE DD7B E919 604D FBF2 8541 0ABE
|
||||
uid Sendmail Signing Key/2010 <sendmail@Sendmail.ORG>
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.9 (OpenBSD)
|
||||
|
||||
mQENBEt+6goBCAC95sVPzf4AWFmUklHO9yGBq6K135Tlt9JaX3frj6PCBjkLNn97
|
||||
J5WDAoLqE9wB7WgiBzs2lu8OPZZcf+6syd97SojEze5bj2uv84DBv2juupbHEBys
|
||||
9OH52QqYWG+1yuwAHY2gjKLYcvNgaOKLp5hoHZ2rakRc4a2ypLTPazsGFBO9/qBA
|
||||
+v6qkP70/lOZeN9HX/yipbygAE+Y9elptW6ohvdGW8jbtllFqYFebB+lIaclkQnK
|
||||
pldnQfktnJDB+XmLOc5m/1BsultlI5IH9HXCeskXxLcxXq+ldg+it1DgzxmHpHTK
|
||||
dIhgOKY3MvTgxkcXiwIGcHBMnov6ESL1KaU5ABEBAAG0MVNlbmRtYWlsIFNpZ25p
|
||||
bmcgS2V5LzIwMTAgPHNlbmRtYWlsQFNlbmRtYWlsLk9SRz6JATkEEwECACMFAkt+
|
||||
6goCGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBgTfvyhUEKvi4qB/0T
|
||||
Em3whttGoUrxdZd1gYKI9SY1/4dHOhD+xJQQgIoQSRpOEA7xQ6TTAYvG8sYdsF5K
|
||||
9/lWjOTEy5w6wBcu4e9F7aO/TUzue/7p0c2UKJTrEOw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TRIyfIIy4vv5vPErqqKen
|
||||
7dII6gptC2i538ntj7k8qkhewKJuTOVpE1eLHe3RxuP8rsv1AsvjJ+6WGZlFYINZ
|
||||
+d0pxSOhdPN9WoTCl9JfkTQrnoVPClzG/euOkF5fUThL90gt31iN+RjB5DeWTPB/
|
||||
jDrq6t5spA8hTKvQ+UB65chI6TzrCr+k8f5D9AR0Fkf9KPFOL7+U9o6Ap9yur5sn
|
||||
njDP4fFVhazVyljUwwPvJ5jjS1cAEQEAAYkBHwQYAQIACQUCS37qCgIbDAAKCRBg
|
||||
TfvyhUEKvpWAB/0YnkJx6/5rIwDh1u5iFdboUCEsX92n9eOilPWw1NWbq/Gdx7+Z
|
||||
xoRjrGl8e8SxOZJbfyehgPX8NxOrkBfcAOOXmOvXSO1i3HSo2gaQxVh1urXojzID
|
||||
raUMcltcNeQagdtDfPhYnS25vJnj+H29Dal2FwLJb9wp8QH1DdhUBoqeRQH34REu
|
||||
fWu0LjF87JjUELhZe0Op4B8HnQV9oGo7W4IYw/3Ek6c5As+WIWSaz0NmHP2Xw+kI
|
||||
kpC4BVIwG0l2mChAT8Ds+rDLGYA2dxYK39mFSApem2KiXFhAanDBb5XgilmeDepk
|
||||
A4NAZlDwxoivB/5PTy67pX+AC1JgvPPafUMu
|
||||
=6Xeh
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
Type Bits KeyID Created Expires Algorithm Use
|
||||
pub 1024 0xA77F2429 2009-01-01 ---------- RSA Sign & Encrypt
|
||||
f16 Fingerprint16 = 33 3A 62 61 2C F3 21 AA 4E 87 47 F2 2F 2C 40 4D
|
||||
@ -1865,4 +2082,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJCyc=
|
||||
=nES8
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
$Revision: 8.29 $, Last updated $Date: 2009/01/06 05:59:03 $
|
||||
$Revision: 8.36 $, Last updated $Date: 2011/01/28 21:17:54 $
|
||||
|
@ -1,11 +1,75 @@
|
||||
SENDMAIL RELEASE NOTES
|
||||
$Id: RELEASE_NOTES,v 8.1963 2009/12/23 04:43:46 ca Exp $
|
||||
$Id: RELEASE_NOTES,v 8.1991 2011/05/15 04:28:16 ca Exp $
|
||||
|
||||
|
||||
This listing shows the version of the sendmail binary, the version
|
||||
of the sendmail configuration files, the date of release, and a
|
||||
summary of the changes in that release.
|
||||
|
||||
8.14.5/8.14.5 2011/05/17
|
||||
Do not cache SMTP extensions across connections as the cache
|
||||
is based on hostname which may not be a unique identifier
|
||||
for a server, i.e., different machines may have the
|
||||
same hostname but provide different SMTP extensions.
|
||||
Problem noted by Jim Hermann.
|
||||
Avoid an out-of-bounds access in case a resolver reply for a DNS
|
||||
map lookup returns a size larger than 1K. Based on a
|
||||
patch from Dr. Werner Fink of SuSE.
|
||||
If a job is aborted using the interrupt signal (e.g., control-C from
|
||||
the keyboard), perform minimal cleanup to avoid invoking
|
||||
functions that are not signal-safe. Note: in previous
|
||||
versions the mail might have been queued up already
|
||||
and would be delivered subsequently, now an interrupt
|
||||
will always remove the queue files and thus prevent
|
||||
delivery.
|
||||
Per RFC 6176, when operating as a TLS client, do not offer SSLv2.
|
||||
Since TLS session resumption is never used as a client, disable
|
||||
use of RFC 4507-style session tickets.
|
||||
Work around gcc4 versions which reverse 25 years of history and
|
||||
no longer align char buffers on the stack, breaking calls
|
||||
to resolver functions on strict alignment platforms.
|
||||
Found by Stuart Henderson of OpenBSD.
|
||||
Read at most two AUTH lines from a server greeting (up to two
|
||||
lines are read because servers may use "AUTH mechs" and
|
||||
"AUTH=mechs"). Otherwise a malicious server may exhaust
|
||||
the memory of the client. Bug report by Nils of MWR
|
||||
InfoSecurity.
|
||||
Avoid triggering an assertion in the OpenLDAP code when the
|
||||
connection to an LDAP server is lost while making a query.
|
||||
Problem noted and patch provided by Andy Fiddaman.
|
||||
If ConnectOnlyTo is set and sendmail is compiled with NETINET6
|
||||
it would try to use an IPv6 address if an IPv4 (or
|
||||
unparseable) address is specified.
|
||||
If SASLv2 is used, make sure that the macro {auth_authen} is
|
||||
stored in xtext format to avoid problems with parsing
|
||||
it. Problem noted by Christophe Wolfhugel.
|
||||
CONFIG: FEATURE(`ldap_routing') in 8.14.4 tried to add a missing
|
||||
-T<TMPF> that is required, but failed for some cases
|
||||
that did not use LDAP. This change has been undone
|
||||
until a better solution can be implemented. Problem
|
||||
found by Andy Fiddaman.
|
||||
CONFIG: Add cf/ostype/solaris11.m4 for Solaris11 support.
|
||||
Contributed by Casper Dik of Oracle.
|
||||
CONTRIB: qtool.pl: Deal with H entries that do not have a
|
||||
letter between the question marks. Patch from
|
||||
Stefan Christensen.
|
||||
DOC: Use a better description for the -i option in sendmail.
|
||||
Patch from Mitchell Berger.
|
||||
Portability:
|
||||
Add support for Darwin 10.x (Mac OS X 10.6).
|
||||
Enable HAVE_NANOSLEEP for FreeBSD 3 and later. Patch
|
||||
from John Marshall.
|
||||
Enable HAVE_NANOSLEEP for OpenBSD 4.3 and later.
|
||||
Use new directory "/system/volatile" for PidFile on
|
||||
Solaris 11. Patch from Casper Dik of Oracle.
|
||||
Fix compilation on Solaris 11 (and maybe some other
|
||||
OSs) when using OpenSSL 1.0. Based on patch from
|
||||
Jan Pechanec of Oracle.
|
||||
Set SOCKADDR_LEN_T and SOCKOPT_LEN_T to socklen_t
|
||||
for Solaris 11. Patch from Roger Faulkner of Oracle.
|
||||
New Files:
|
||||
cf/ostype/solaris11.m4
|
||||
|
||||
8.14.4/8.14.4 2009/12/30
|
||||
SECURITY: Handle bogus certificates containing NUL characters
|
||||
in CNs by placing a string indicating a bad certificate
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2004, 2009, 2010 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
|
||||
# Copyright (c) 1988, 1993
|
||||
@ -16,8 +16,8 @@
|
||||
#####
|
||||
##### SENDMAIL CONFIGURATION FILE
|
||||
#####
|
||||
##### built by ca@wiz.smi.sendmail.com on Tue Dec 22 20:49:09 PST 2009
|
||||
##### in /extra/home/ca/sm-8.14.4/OpenSource/sendmail-8.14.4/cf/cf
|
||||
##### built by ca@wiz.smi.sendmail.com on Sat May 14 21:31:14 PDT 2011
|
||||
##### in /extra/home/ca/sm-8.14.5/OpenSource/sendmail-8.14.5/cf/cf
|
||||
##### using ../ as configuration include directory
|
||||
#####
|
||||
######################################################################
|
||||
@ -27,7 +27,7 @@
|
||||
######################################################################
|
||||
######################################################################
|
||||
|
||||
##### $Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $ #####
|
||||
##### $Id: cfhead.m4,v 8.121 2010/01/07 18:20:19 ca Exp $ #####
|
||||
##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ #####
|
||||
##### $Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $ #####
|
||||
##### $Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $ #####
|
||||
@ -35,7 +35,7 @@
|
||||
##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ #####
|
||||
|
||||
|
||||
##### $Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $ #####
|
||||
##### $Id: proto.m4,v 8.744 2010/11/23 20:29:47 guenther Exp $ #####
|
||||
|
||||
# level 10 config file format
|
||||
V10/Berkeley
|
||||
@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1]
|
||||
|
||||
|
||||
# Configuration version number
|
||||
DZ8.14.4/Submit
|
||||
DZ8.14.5/Submit
|
||||
|
||||
|
||||
###############
|
||||
@ -992,7 +992,6 @@ R< $* > $* $: $2
|
||||
|
||||
|
||||
|
||||
|
||||
######################################################################
|
||||
### check_mail -- check SMTP `MAIL FROM:' command argument
|
||||
######################################################################
|
||||
|
@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1999-2002, 2004, 2007, 2009 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1999-2002, 2004, 2007 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# By using this file, you agree to the terms and conditions set
|
||||
@ -10,7 +10,7 @@ divert(-1)
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`$Id: ldap_routing.m4,v 8.17 2009/06/26 21:11:08 ca Exp $')
|
||||
VERSIONID(`$Id: ldap_routing.m4,v 8.18 2010/01/05 00:57:27 ca Exp $')
|
||||
divert(-1)
|
||||
|
||||
# Check first two arguments. If they aren't set, may need to warn in proto.m4
|
||||
@ -35,40 +35,12 @@ ifelse(len(X`'_ARG6_), `1', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')',
|
||||
_ARG6_, `tempfail', `define(`_LDAP_ROUTE_MAPTEMP_', `_TEMPFAIL_')',
|
||||
_ARG6_, `queue', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')')
|
||||
|
||||
define(`_ATMPF_', `<TMPF>')dnl
|
||||
dnl check whether arg contains -T`'_ATMPF_
|
||||
dnl unless it is a sequence map or just LDAP
|
||||
dnl note: this does not work if ARG1 begins with space(s), however, as
|
||||
dnl we issue a warning, hopefully the user will fix it...
|
||||
ifelse(defn(`_ARG1_'), `', `',
|
||||
defn(`_ARG1_'), `LDAP', `',
|
||||
`ifelse(index(_ARG1_, `sequence '), `0', `',
|
||||
`ifelse(index(_ARG1_, _ATMPF_), `-1',
|
||||
`errprint(`*** WARNING: missing -T'_ATMPF_` in first argument of FEATURE(`ldap_routing')
|
||||
')
|
||||
define(`_ABP_', index(_ARG1_, ` '))
|
||||
define(`_NARG1_', `substr(_ARG1_, 0, _ABP_) -T'_ATMPF_` substr(_ARG1_, _ABP_)')
|
||||
')
|
||||
')
|
||||
')
|
||||
ifelse(defn(`_ARG2_'), `', `',
|
||||
defn(`_ARG2_'), `LDAP', `',
|
||||
`ifelse(index(_ARG2_, `sequence '), `0', `',
|
||||
`ifelse(index(_ARG2_, _ATMPF_), `-1',
|
||||
`errprint(`*** WARNING: missing -T'_ATMPF_` in second argument of FEATURE(`ldap_routing')
|
||||
')
|
||||
define(`_ABP_', index(_ARG2_, ` '))
|
||||
define(`_NARG2_', `substr(_ARG2_, 0, _ABP_) -T'_ATMPF_` substr(_ARG2_, _ABP_)')
|
||||
')
|
||||
')
|
||||
')
|
||||
|
||||
LOCAL_CONFIG
|
||||
# LDAP routing maps
|
||||
Kldapmh ifelse(len(X`'_ARG1_), `1',
|
||||
`ldap -1 -T<TMPF> -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))',
|
||||
defn(`_NARG1_'), `', `_ARG1_', `_NARG1_')
|
||||
`_ARG1_')
|
||||
|
||||
Kldapmra ifelse(len(X`'_ARG2_), `1',
|
||||
`ldap -1 -T<TMPF> -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))',
|
||||
defn(`_NARG2_'), `', `_ARG2_', `_NARG2_')
|
||||
`_ARG2_')
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 1998-2004, 2009 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2004, 2009, 2010 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
|
||||
# Copyright (c) 1988, 1993
|
||||
@ -189,6 +189,7 @@ SLocal_tls_server')
|
||||
define(`LOCAL_RULE_3', `divert(2)')
|
||||
define(`LOCAL_CONFIG', `divert(6)')
|
||||
define(`MAILER_DEFINITIONS', `divert(7)')
|
||||
define(`LOCAL_DNSBL', `divert(8)')
|
||||
define(`LOCAL_NET_CONFIG', `define(`_LOCAL_RULES_', 1)divert(1)')
|
||||
define(`UUCPSMTP', `R DOL(*) < @ $1 .UUCP > DOL(*) DOL(1) < @ $2 > DOL(2)')
|
||||
define(`CONCAT', `$1$2$3$4$5$6$7')
|
||||
@ -308,4 +309,4 @@ define(`confMILTER_MACROS_EOM', `{msg_id}')
|
||||
|
||||
|
||||
divert(0)dnl
|
||||
VERSIONID(`$Id: cfhead.m4,v 8.120 2009/01/23 22:39:21 ca Exp $')
|
||||
VERSIONID(`$Id: cfhead.m4,v 8.121 2010/01/07 18:20:19 ca Exp $')
|
||||
|
@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
|
||||
# Copyright (c) 1988, 1993
|
||||
@ -13,10 +13,10 @@ divert(-1)
|
||||
#
|
||||
divert(0)
|
||||
|
||||
VERSIONID(`$Id: proto.m4,v 8.741 2009/12/11 00:04:53 ca Exp $')
|
||||
VERSIONID(`$Id: proto.m4,v 8.744 2010/11/23 20:29:47 guenther Exp $')
|
||||
|
||||
# level CF_LEVEL config file format
|
||||
V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
|
||||
V`'CF_LEVEL`'ifdef(`NO_VENDOR',`', `/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')')
|
||||
divert(-1)
|
||||
|
||||
dnl if MAILER(`local') not defined: do it ourself; be nice
|
||||
@ -1795,7 +1795,7 @@ ifdef(`_CONN_CONTROL_',`dnl
|
||||
ifdef(`_CONN_CONTROL_IMMEDIATE_',`',`dnl
|
||||
dnl workspace: ignored...
|
||||
R$* $: $>"ConnControl" dummy')', `dnl')
|
||||
undivert(8)
|
||||
undivert(8)dnl LOCAL_DNSBL
|
||||
ifdef(`_REQUIRE_RDNS_', `dnl
|
||||
R$* $: $&{client_addr} $| $&{client_resolve}
|
||||
R$=R $* $@ RELAY We relay for these
|
||||
|
@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
|
||||
# Copyright (c) 1988, 1993
|
||||
@ -11,8 +11,8 @@ divert(-1)
|
||||
# the sendmail distribution.
|
||||
#
|
||||
#
|
||||
VERSIONID(`$Id: version.m4,v 8.205 2009/12/23 04:43:09 ca Exp $')
|
||||
VERSIONID(`$Id: version.m4,v 8.214 2011/04/26 23:02:36 ca Exp $')
|
||||
#
|
||||
divert(0)
|
||||
# Configuration version number
|
||||
DZ8.14.4`'ifdef(`confCF_VERSION', `/confCF_VERSION')
|
||||
DZ8.14.5`'ifdef(`confCF_VERSION', `/confCF_VERSION')
|
||||
|
22
contrib/sendmail/cf/ostype/solaris11.m4
Normal file
22
contrib/sendmail/cf/ostype/solaris11.m4
Normal file
@ -0,0 +1,22 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 2011 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# By using this file, you agree to the terms and conditions set
|
||||
# forth in the LICENSE file which can be found at the top level of
|
||||
# the sendmail distribution.
|
||||
#
|
||||
# This ostype file is suitable for use on Solaris 11 and later systems,
|
||||
# make use of /system/volatile, introduced in Solaris 11.
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`$Id: solaris11.m4,v 1.1 2011/01/24 21:22:08 ca Exp $')
|
||||
divert(-1)
|
||||
|
||||
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')
|
||||
define(`confEBINDIR', `/usr/lib')dnl
|
||||
define(`confPID_FILE', `/system/volatile/sendmail.pid')dnl
|
||||
define(`_NETINET6_')dnl
|
||||
FEATURE(`local_lmtp')dnl
|
@ -3,7 +3,7 @@
|
||||
## Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
|
||||
## All rights reserved.
|
||||
##
|
||||
## $Id: qtool.pl,v 8.30 2009/03/04 16:57:30 ca Exp $
|
||||
## $Id: qtool.pl,v 8.31 2010/11/10 19:11:54 ca Exp $
|
||||
##
|
||||
use strict;
|
||||
use File::Basename;
|
||||
@ -607,7 +607,7 @@ sub parse_header
|
||||
$first_char = substr($line, 0, 1);
|
||||
if ($first_char eq "?")
|
||||
{
|
||||
$line = substr($line, 3);
|
||||
$line = (split(/\?/, $line,3))[2];
|
||||
}
|
||||
elsif ($first_char eq "\t")
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
||||
.\" the sendmail distribution.
|
||||
.\"
|
||||
.\"
|
||||
.\" $Id: op.me,v 8.745 2009/12/13 04:12:46 ca Exp $
|
||||
.\" $Id: op.me,v 8.747 2010/05/08 04:18:27 ca Exp $
|
||||
.\"
|
||||
.\" eqn op.me | pic | troff -me
|
||||
.\"
|
||||
@ -90,7 +90,7 @@ Sendmail, Inc.
|
||||
.de Ve
|
||||
Version \\$2
|
||||
..
|
||||
.Ve $Revision: 8.745 $
|
||||
.Ve $Revision: 8.747 $
|
||||
.rm Ve
|
||||
.sp
|
||||
For Sendmail Version 8.14
|
||||
@ -1095,6 +1095,9 @@ The number of envelope recipients for this message
|
||||
(after aliasing and forwarding).
|
||||
.ip msgid
|
||||
The message id of the message (from the header).
|
||||
.ip bodytype
|
||||
The message body type (7BIT or 8BITMIME),
|
||||
as determined from the envelope.
|
||||
.ip proto
|
||||
The protocol used to receive this message (e.g., ESMTP or UUCP)
|
||||
.ip daemon
|
||||
@ -5154,7 +5157,8 @@ FAIL cert presented but could not be verified,
|
||||
e.g., the signing CA is missing.
|
||||
NONE STARTTLS has not been performed.
|
||||
TEMP temporary error occurred.
|
||||
PROTOCOL some protocol error occurred.
|
||||
PROTOCOL some protocol error occurred
|
||||
at the ESMTP level (not TLS).
|
||||
SOFTWARE STARTTLS handshake failed,
|
||||
which is a fatal error for this session,
|
||||
the e-mail will be queued.
|
||||
@ -11463,7 +11467,7 @@ replace it with a blank sheet for double-sided output.
|
||||
.\".sz 10
|
||||
.\"Eric Allman
|
||||
.\".sp
|
||||
.\"Version $Revision: 8.745 $
|
||||
.\"Version $Revision: 8.747 $
|
||||
.\".ce 0
|
||||
.bp 3
|
||||
.ce
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -10,7 +10,7 @@
|
||||
* the sendmail distribution.
|
||||
*
|
||||
*
|
||||
* $Id: conf.h,v 1.139 2009/06/16 23:41:32 ca Exp $
|
||||
* $Id: conf.h,v 1.144 2011/05/03 16:24:00 ca Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -381,6 +381,12 @@ typedef int pid_t;
|
||||
# ifndef __svr4__
|
||||
# define __svr4__ /* use all System V Release 4 defines below */
|
||||
# endif /* ! __svr4__ */
|
||||
# if SOLARIS >= 21100
|
||||
# include <paths.h>
|
||||
# endif /* SOLARIS >= 21100 */
|
||||
# ifndef _PATH_VARRUN
|
||||
# define _PATH_VARRUN "/var/run/"
|
||||
# endif /* _PATH_VARRUN */
|
||||
# define GIDSET_T gid_t
|
||||
# define USE_SA_SIGACTION 1 /* use sa_sigaction field */
|
||||
# define BROKEN_PTHREAD_SLEEP 1 /* sleep after pthread_create() fails */
|
||||
@ -443,7 +449,7 @@ typedef int pid_t;
|
||||
# endif /* SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207) */
|
||||
# if SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208)
|
||||
# undef _PATH_SENDMAILPID /* tmpfs /var/run added in 2.8 */
|
||||
# define _PATH_SENDMAILPID "/var/run/sendmail.pid"
|
||||
# define _PATH_SENDMAILPID _PATH_VARRUN "sendmail.pid"
|
||||
# ifndef SMRSH_CMDDIR
|
||||
# define SMRSH_CMDDIR "/var/adm/sm.bin"
|
||||
# endif /* ! SMRSH_CMDDIR */
|
||||
@ -461,6 +467,8 @@ typedef int pid_t;
|
||||
# if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211)
|
||||
# define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */
|
||||
# define HAVE_NANOSLEEP 1 /* moved from librt to libc in S11 */
|
||||
# define SOCKADDR_LEN_T socklen_t /* arg#3 to accept, getsockname */
|
||||
# define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */
|
||||
# endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */
|
||||
# ifndef HASGETUSERSHELL
|
||||
# define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */
|
||||
@ -1014,6 +1022,9 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
# if __FreeBSD_version >= 222000 /* 2.2.2-release and later */
|
||||
# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
|
||||
# endif /* __FreeBSD_version >= 222000 */
|
||||
# if __FreeBSD_version >= 300000 /* 3.0.0-release and later */
|
||||
# define HAVE_NANOSLEEP 1 /* has nanosleep(2) */
|
||||
# endif /* __FreeBSD_version >= 300000 */
|
||||
# if __FreeBSD_version >= 330000 /* 3.3.0-release and later */
|
||||
# ifndef SMRSH_CMDDIR
|
||||
# define SMRSH_CMDDIR "/usr/libexec/sm.bin"
|
||||
@ -1055,6 +1066,9 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
# if OpenBSD >= 200505
|
||||
# undef NETISO /* iso.h removed in 3.7 */
|
||||
# endif /* OpenBSD >= 200505 */
|
||||
# if OpenBSD >= 200800
|
||||
# define HAVE_NANOSLEEP 1 /* has nanosleep(2) */
|
||||
# endif /* OpenBSD >= 200800 */
|
||||
# endif /* defined(__OpenBSD__) */
|
||||
# endif /* defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
|
||||
|
||||
@ -2808,7 +2822,7 @@ struct utsname
|
||||
|
||||
# if _FFR_LINUX_MHNL && defined(__linux__) && MAXHOSTNAMELEN < 255
|
||||
/*
|
||||
** override Linux wierdness: a FQHN can be 255 chars long
|
||||
** override Linux weirdness: a FQHN can be 255 chars long
|
||||
** SUSv3 requires HOST_NAME_MAX ("Maximum length of a host
|
||||
** name (not including the terminating null) as returned from the
|
||||
** gethostname() function.") to be at least 255. c.f.:
|
||||
|
@ -4,7 +4,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<!--
|
||||
$Id: overview.html,v 1.20 2009/11/13 18:15:05 ca Exp $
|
||||
$Id: overview.html,v 1.21 2010/12/14 20:59:52 ca Exp $
|
||||
-->
|
||||
|
||||
<H1>Technical Overview</H1>
|
||||
@ -126,7 +126,7 @@ messages may be sent in a single connection.
|
||||
Note also that a message or connection may be aborted by
|
||||
either the remote host or the MTA
|
||||
at any point during the SMTP transaction.
|
||||
f this occurs during a message (between the MAIL command and the final "."),
|
||||
If this occurs during a message (between the MAIL command and the final "."),
|
||||
the filter's
|
||||
<A HREF="xxfi_abort.html">xxfi_abort</A> routine will be called.
|
||||
<A HREF="xxfi_close.html">xxfi_close</A> is called any time the
|
||||
|
@ -2,7 +2,7 @@
|
||||
<HEAD><TITLE>smfi_stop</TITLE></HEAD>
|
||||
<BODY>
|
||||
<!--
|
||||
$Id: smfi_stop.html,v 1.6 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_stop.html,v 1.7 2010/12/13 16:16:01 ca Exp $
|
||||
-->
|
||||
<H1>smfi_stop</H1>
|
||||
|
||||
@ -42,7 +42,7 @@ which may then exit or warm-restart.
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>void</TD>
|
||||
<TD>Takes no arguement.
|
||||
<TD>Takes no argument.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<HEAD><TITLE>xxfi_envrcpt</TITLE></HEAD>
|
||||
<BODY>
|
||||
<!--
|
||||
$Id: xxfi_envrcpt.html,v 1.15 2007/01/25 01:00:20 ca Exp $
|
||||
$Id: xxfi_envrcpt.html,v 1.16 2010/07/14 04:41:03 ca Exp $
|
||||
-->
|
||||
<H1>xxfi_envrcpt</H1>
|
||||
|
||||
@ -71,7 +71,8 @@ Handle the envelope RCPT command.
|
||||
</TR>
|
||||
<TR valign="top">
|
||||
<TD>SMFIS_ACCEPT</TD>
|
||||
<TD>Accept recipient. <A href="xxfi_abort.html">xxfi_abort</A> will not be called.
|
||||
<TD>Accept this message.
|
||||
<A href="xxfi_abort.html">xxfi_abort</A> will not be called.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
@ -87,7 +88,7 @@ Handle the envelope RCPT command.
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
Copyright (c) 2000, 2003, 2010 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <sm/gen.h>
|
||||
SM_RCSID("@(#)$Id: engine.c,v 8.166 2009/11/06 00:57:07 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: engine.c,v 8.167 2011/03/03 06:09:15 ca Exp $")
|
||||
|
||||
#include "libmilter.h"
|
||||
|
||||
@ -284,7 +284,7 @@ mi_engine(ctx)
|
||||
if (mi_stop() == MILTER_ABRT)
|
||||
{
|
||||
if (ctx->ctx_dbg > 3)
|
||||
sm_dprintf("[%ld] milter_abort\n",
|
||||
sm_dprintf("[%lu] milter_abort\n",
|
||||
(long) ctx->ctx_id);
|
||||
ret = MI_FAILURE;
|
||||
break;
|
||||
@ -315,7 +315,7 @@ mi_engine(ctx)
|
||||
cmd < SMFIC_VALIDCMD)
|
||||
{
|
||||
if (ctx->ctx_dbg > 5)
|
||||
sm_dprintf("[%ld] mi_engine: mi_rd_cmd error (%x)\n",
|
||||
sm_dprintf("[%lu] mi_engine: mi_rd_cmd error (%x)\n",
|
||||
(long) ctx->ctx_id, (int) cmd);
|
||||
|
||||
/*
|
||||
@ -328,7 +328,7 @@ mi_engine(ctx)
|
||||
break;
|
||||
}
|
||||
if (ctx->ctx_dbg > 4)
|
||||
sm_dprintf("[%ld] got cmd '%c' len %d\n",
|
||||
sm_dprintf("[%lu] got cmd '%c' len %d\n",
|
||||
(long) ctx->ctx_id, cmd, (int) len);
|
||||
for (i = 0; i < ncmds; i++)
|
||||
{
|
||||
@ -339,7 +339,7 @@ mi_engine(ctx)
|
||||
{
|
||||
/* unknown command */
|
||||
if (ctx->ctx_dbg > 1)
|
||||
sm_dprintf("[%ld] cmd '%c' unknown\n",
|
||||
sm_dprintf("[%lu] cmd '%c' unknown\n",
|
||||
(long) ctx->ctx_id, cmd);
|
||||
ret = MI_FAILURE;
|
||||
break;
|
||||
@ -348,7 +348,7 @@ mi_engine(ctx)
|
||||
{
|
||||
/* stop for now */
|
||||
if (ctx->ctx_dbg > 1)
|
||||
sm_dprintf("[%ld] cmd '%c' not impl\n",
|
||||
sm_dprintf("[%lu] cmd '%c' not impl\n",
|
||||
(long) ctx->ctx_id, cmd);
|
||||
ret = MI_FAILURE;
|
||||
break;
|
||||
@ -357,14 +357,14 @@ mi_engine(ctx)
|
||||
/* is new state ok? */
|
||||
newstate = cmds[i].cm_next;
|
||||
if (ctx->ctx_dbg > 5)
|
||||
sm_dprintf("[%ld] cur %x new %x nextmask %x\n",
|
||||
sm_dprintf("[%lu] cur %x new %x nextmask %x\n",
|
||||
(long) ctx->ctx_id,
|
||||
curstate, newstate, next_states[curstate]);
|
||||
|
||||
if (newstate != ST_NONE && !trans_ok(curstate, newstate))
|
||||
{
|
||||
if (ctx->ctx_dbg > 1)
|
||||
sm_dprintf("[%ld] abort: cur %d (%x) new %d (%x) next %x\n",
|
||||
sm_dprintf("[%lu] abort: cur %d (%x) new %d (%x) next %x\n",
|
||||
(long) ctx->ctx_id,
|
||||
curstate, MI_MASK(curstate),
|
||||
newstate, MI_MASK(newstate),
|
||||
@ -434,7 +434,7 @@ mi_engine(ctx)
|
||||
else if (r == _SMFIS_ABORT)
|
||||
{
|
||||
if (ctx->ctx_dbg > 5)
|
||||
sm_dprintf("[%ld] function returned abort\n",
|
||||
sm_dprintf("[%lu] function returned abort\n",
|
||||
(long) ctx->ctx_id);
|
||||
ret = MI_FAILURE;
|
||||
break;
|
||||
@ -1122,7 +1122,7 @@ st_optionneg(g)
|
||||
fix_stm(ctx);
|
||||
|
||||
if (ctx->ctx_dbg > 3)
|
||||
sm_dprintf("[%ld] milter_negotiate:"
|
||||
sm_dprintf("[%lu] milter_negotiate:"
|
||||
" mta_actions=0x%lx, mta_flags=0x%lx"
|
||||
" actions=0x%lx, flags=0x%lx\n"
|
||||
, (long) ctx->ctx_id
|
||||
@ -1131,7 +1131,7 @@ st_optionneg(g)
|
||||
|
||||
#if _FFR_MILTER_CHECK
|
||||
if (ctx->ctx_dbg > 3)
|
||||
sm_dprintf("[%ld] milter_negotiate:"
|
||||
sm_dprintf("[%lu] milter_negotiate:"
|
||||
" testmode=%d, pflags2mta=%X, internal_pflags=%X\n"
|
||||
, (long) ctx->ctx_id, testmode
|
||||
, ctx->ctx_pflags2mta, internal_pflags);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2001, 2004 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1999-2001, 2004, 2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <sm/gen.h>
|
||||
SM_RCSID("@(#)$Id: sm_gethost.c,v 8.27 2004/08/20 21:12:37 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: sm_gethost.c,v 8.29 2010/07/27 01:09:31 ca Exp $")
|
||||
|
||||
#include <sendmail.h>
|
||||
#if NETINET || NETINET6
|
||||
@ -30,7 +30,7 @@ SM_RCSID("@(#)$Id: sm_gethost.c,v 8.27 2004/08/20 21:12:37 ca Exp $")
|
||||
|
||||
#if NETINET6 && NEEDSGETIPNODE
|
||||
|
||||
static struct hostent *getipnodebyname __P((char *, int, int, int *));
|
||||
static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *));
|
||||
|
||||
# ifndef AI_ADDRCONFIG
|
||||
# define AI_ADDRCONFIG 0 /* dummy */
|
||||
@ -43,8 +43,8 @@ static struct hostent *getipnodebyname __P((char *, int, int, int *));
|
||||
# endif /* ! AI_DEFAULT */
|
||||
|
||||
static struct hostent *
|
||||
getipnodebyname(name, family, flags, err)
|
||||
char *name;
|
||||
sm_getipnodebyname(name, family, flags, err)
|
||||
const char *name;
|
||||
int family;
|
||||
int flags;
|
||||
int *err;
|
||||
@ -77,6 +77,8 @@ freehostent(h)
|
||||
|
||||
return;
|
||||
}
|
||||
#else /* NEEDSGETIPNODE && NETINET6 */
|
||||
#define sm_getipnodebyname getipnodebyname
|
||||
#endif /* NEEDSGETIPNODE && NETINET6 */
|
||||
|
||||
struct hostent *
|
||||
@ -107,7 +109,7 @@ mi_gethostbyname(name, family)
|
||||
# if ADDRCONFIG_IS_BROKEN
|
||||
flags &= ~AI_ADDRCONFIG;
|
||||
# endif /* ADDRCONFIG_IS_BROKEN */
|
||||
h = getipnodebyname(name, family, flags, &err);
|
||||
h = sm_getipnodebyname(name, family, flags, &err);
|
||||
SM_SET_H_ERRNO(err);
|
||||
# else /* NETINET6 */
|
||||
h = gethostbyname(name);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003-2004, 2007, 2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 2003-2004, 2007, 2009-2011 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <sm/gen.h>
|
||||
SM_RCSID("@(#)$Id: worker.c,v 8.17 2009/06/15 15:34:54 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: worker.c,v 8.19 2011/02/14 23:33:48 ca Exp $")
|
||||
|
||||
#include "libmilter.h"
|
||||
|
||||
@ -165,7 +165,9 @@ mi_start_session(ctx)
|
||||
{
|
||||
static long id = 0;
|
||||
|
||||
SM_ASSERT(Tskmgr.tm_signature == TM_SIGNATURE);
|
||||
/* this can happen if the milter is shutting down */
|
||||
if (Tskmgr.tm_signature != TM_SIGNATURE)
|
||||
return MI_FAILURE;
|
||||
SM_ASSERT(ctx != NULL);
|
||||
POOL_LEV_DPRINTF(4, ("PIPE r=[%d] w=[%d]", RD_PIPE, WR_PIPE));
|
||||
TASKMGR_LOCK();
|
||||
@ -215,6 +217,41 @@ mi_close_session(ctx)
|
||||
return MI_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
** NONBLOCKING -- set nonblocking mode for a file descriptor.
|
||||
**
|
||||
** Parameters:
|
||||
** fd -- file descriptor
|
||||
** name -- name for (error) logging
|
||||
**
|
||||
** Returns:
|
||||
** MI_SUCCESS/MI_FAILURE
|
||||
*/
|
||||
|
||||
static int
|
||||
nonblocking(int fd, const char *name)
|
||||
{
|
||||
int r;
|
||||
|
||||
errno = 0;
|
||||
r = fcntl(fd, F_GETFL, 0);
|
||||
if (r == -1)
|
||||
{
|
||||
smi_log(SMI_LOG_ERR, "fcntl(%s, F_GETFL)=%s",
|
||||
name, sm_errstring(errno));
|
||||
return MI_FAILURE;
|
||||
}
|
||||
errno = 0;
|
||||
r = fcntl(fd, F_SETFL, r | O_NONBLOCK);
|
||||
if (r == -1)
|
||||
{
|
||||
smi_log(SMI_LOG_ERR, "fcntl(%s, F_SETFL, O_NONBLOCK)=%s",
|
||||
name, sm_errstring(errno));
|
||||
return MI_FAILURE;
|
||||
}
|
||||
return MI_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
** MI_POOL_CONTROLER_INIT -- Launch the worker pool controller
|
||||
** Must be called before starting sessions.
|
||||
@ -246,6 +283,12 @@ mi_pool_controller_init()
|
||||
sm_errstring(errno));
|
||||
return MI_FAILURE;
|
||||
}
|
||||
r = nonblocking(WR_PIPE, "WR_PIPE");
|
||||
if (r != MI_SUCCESS)
|
||||
return r;
|
||||
r = nonblocking(RD_PIPE, "RD_PIPE");
|
||||
if (r != MI_SUCCESS)
|
||||
return r;
|
||||
|
||||
(void) smutex_init(&Tskmgr.tm_w_mutex);
|
||||
(void) scond_init(&Tskmgr.tm_w_cond);
|
||||
@ -495,25 +538,23 @@ mi_pool_controller(arg)
|
||||
/* has a worker signaled an end of task ? */
|
||||
if (WAIT_FD(i) == RD_PIPE)
|
||||
{
|
||||
char evt = 0;
|
||||
int r = 0;
|
||||
char evts[256];
|
||||
ssize_t r;
|
||||
|
||||
POOL_LEV_DPRINTF(4,
|
||||
("PIPE WILL READ evt = %08X %08X",
|
||||
pfd[i].events, pfd[i].revents));
|
||||
|
||||
if ((pfd[i].revents & MI_POLL_RD_FLAGS) != 0)
|
||||
r = 1;
|
||||
while ((pfd[i].revents & MI_POLL_RD_FLAGS) != 0
|
||||
&& r != -1)
|
||||
{
|
||||
r = read(RD_PIPE, &evt, sizeof(evt));
|
||||
if (r == sizeof(evt))
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
r = read(RD_PIPE, evts, sizeof(evts));
|
||||
}
|
||||
|
||||
POOL_LEV_DPRINTF(4,
|
||||
("PIPE DONE READ i=[%d] fd=[%d] r=[%d] evt=[%d]",
|
||||
i, RD_PIPE, r, evt));
|
||||
i, RD_PIPE, (int) r, evts[0]));
|
||||
|
||||
if ((pfd[i].revents & ~MI_POLL_RD_FLAGS) != 0)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
#define LDAP_DEPRECATED 1
|
||||
|
||||
#include <sm/gen.h>
|
||||
SM_RCSID("@(#)$Id: ldap.c,v 1.83 2009/06/19 22:02:26 guenther Exp $")
|
||||
SM_RCSID("@(#)$Id: ldap.c,v 1.85 2011/04/18 22:20:20 ca Exp $")
|
||||
|
||||
#if LDAPMAP
|
||||
# include <sys/types.h>
|
||||
@ -1098,10 +1098,8 @@ sm_ldap_results(lmap, msgid, flags, delim, rpool, result,
|
||||
|
||||
if (ret == 0)
|
||||
save_errno = ETIMEDOUT;
|
||||
else
|
||||
else if (ret == LDAP_RES_SEARCH_RESULT)
|
||||
{
|
||||
int rc;
|
||||
|
||||
/*
|
||||
** We may have gotten an LDAP_RES_SEARCH_RESULT response
|
||||
** with an error inside it, so we have to extract that
|
||||
@ -1109,11 +1107,21 @@ sm_ldap_results(lmap, msgid, flags, delim, rpool, result,
|
||||
** to an LDAP proxy whose backend has gone down.
|
||||
*/
|
||||
|
||||
save_errno = ldap_parse_result(lmap->ldap_ld, lmap->ldap_res,
|
||||
&rc, NULL, NULL, NULL, NULL, 0);
|
||||
if (save_errno == LDAP_SUCCESS)
|
||||
save_errno = rc;
|
||||
if (lmap->ldap_res == NULL)
|
||||
save_errno = LDAP_UNAVAILABLE;
|
||||
else
|
||||
{
|
||||
int rc;
|
||||
|
||||
save_errno = ldap_parse_result(lmap->ldap_ld,
|
||||
lmap->ldap_res, &rc, NULL, NULL,
|
||||
NULL, NULL, 0);
|
||||
if (save_errno == LDAP_SUCCESS)
|
||||
save_errno = rc;
|
||||
}
|
||||
}
|
||||
else
|
||||
save_errno = sm_ldap_geterrno(lmap->ldap_ld);
|
||||
if (save_errno != LDAP_SUCCESS)
|
||||
{
|
||||
statp = EX_TEMPFAIL;
|
||||
|
@ -20,7 +20,7 @@ SM_IDSTR(copyright,
|
||||
Copyright (c) 1992, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n")
|
||||
|
||||
SM_IDSTR(id, "@(#)$Id: makemap.c,v 8.179 2008/04/14 02:06:16 ca Exp $")
|
||||
SM_IDSTR(id, "@(#)$Id: makemap.c,v 8.180 2010/11/23 02:35:08 gshapiro Exp $")
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -238,7 +238,7 @@ main(argc, argv)
|
||||
if ((cfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, cfile, SM_IO_RDONLY,
|
||||
NULL)) == NULL)
|
||||
{
|
||||
sm_io_fprintf(smioerr, SM_TIME_DEFAULT, "makemap: %s: %s",
|
||||
sm_io_fprintf(smioerr, SM_TIME_DEFAULT, "makemap: %s: %s\n",
|
||||
cfile, sm_errstring(errno));
|
||||
exit(EX_NOINPUT);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
dnl $Id: Makefile.m4,v 8.121 2009/12/15 22:39:23 ca Exp $
|
||||
dnl $Id: Makefile.m4,v 8.126 2010/11/24 19:59:54 gshapiro Exp $
|
||||
include(confBUILDTOOLSDIR`/M4/switch.m4')
|
||||
|
||||
define(`confREQUIRE_LIBSM', `true')
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
#include <sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: conf.c,v 8.1153 2009/12/18 17:25:12 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: conf.c,v 8.1168 2011/01/25 18:31:30 ca Exp $")
|
||||
|
||||
#include <sm/sendmail.h>
|
||||
#include <sendmail/pathnames.h>
|
||||
@ -50,8 +50,11 @@ static int get_num_procs_online __P((void));
|
||||
static int add_hostnames __P((SOCKADDR *));
|
||||
|
||||
#if NETINET6 && NEEDSGETIPNODE
|
||||
static struct hostent *getipnodebyname __P((char *, int, int, int *));
|
||||
static struct hostent *getipnodebyaddr __P((char *, int, int, int *));
|
||||
static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *));
|
||||
static struct hostent *sm_getipnodebyaddr __P((const void *, size_t, int, int *));
|
||||
#else /* NETINET6 && NEEDSGETIPNODE */
|
||||
#define sm_getipnodebyname getipnodebyname
|
||||
#define sm_getipnodebyaddr getipnodebyaddr
|
||||
#endif /* NETINET6 && NEEDSGETIPNODE */
|
||||
|
||||
|
||||
@ -2600,7 +2603,7 @@ setproctitle(fmt, va_alist)
|
||||
** none.
|
||||
*/
|
||||
|
||||
/*VARARGS2*/
|
||||
/*VARARGS3*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
sm_setproctitle(bool status, ENVELOPE *e, const char *fmt, ...)
|
||||
@ -4188,7 +4191,7 @@ strstr(big, little)
|
||||
/*
|
||||
** SM_GETHOSTBY{NAME,ADDR} -- compatibility routines for gethostbyXXX
|
||||
**
|
||||
** Some operating systems have wierd problems with the gethostbyXXX
|
||||
** Some operating systems have weird problems with the gethostbyXXX
|
||||
** routines. For example, Solaris versions at least through 2.3
|
||||
** don't properly deliver a canonical h_name field. This tries to
|
||||
** work around these problems.
|
||||
@ -4212,8 +4215,8 @@ strstr(big, little)
|
||||
# endif /* ! AI_ALL */
|
||||
|
||||
static struct hostent *
|
||||
getipnodebyname(name, family, flags, err)
|
||||
char *name;
|
||||
sm_getipnodebyname(name, family, flags, err)
|
||||
const char *name;
|
||||
int family;
|
||||
int flags;
|
||||
int *err;
|
||||
@ -4236,9 +4239,9 @@ getipnodebyname(name, family, flags, err)
|
||||
}
|
||||
|
||||
static struct hostent *
|
||||
getipnodebyaddr(addr, len, family, err)
|
||||
char *addr;
|
||||
int len;
|
||||
sm_getipnodebyaddr(addr, len, family, err)
|
||||
const void *addr;
|
||||
size_t len;
|
||||
int family;
|
||||
int *err;
|
||||
{
|
||||
@ -4305,7 +4308,7 @@ sm_gethostbyname(name, family)
|
||||
# if ADDRCONFIG_IS_BROKEN
|
||||
flags &= ~AI_ADDRCONFIG;
|
||||
# endif /* ADDRCONFIG_IS_BROKEN */
|
||||
h = getipnodebyname(name, family, flags, &err);
|
||||
h = sm_getipnodebyname(name, family, flags, &err);
|
||||
SM_SET_H_ERRNO(err);
|
||||
# else /* NETINET6 */
|
||||
h = gethostbyname(name);
|
||||
@ -4344,7 +4347,7 @@ sm_gethostbyname(name, family)
|
||||
hbuf, family);
|
||||
|
||||
# if NETINET6
|
||||
h = getipnodebyname(hbuf, family, flags, &err);
|
||||
h = sm_getipnodebyname(hbuf, family, flags, &err);
|
||||
SM_SET_H_ERRNO(err);
|
||||
save_errno = errno;
|
||||
# else /* NETINET6 */
|
||||
@ -4441,7 +4444,7 @@ sm_gethostbyaddr(addr, len, type)
|
||||
{
|
||||
int err;
|
||||
|
||||
hp = getipnodebyaddr(addr, len, type, &err);
|
||||
hp = sm_getipnodebyaddr(addr, len, type, &err);
|
||||
SM_SET_H_ERRNO(err);
|
||||
}
|
||||
# else /* NETINET6 */
|
||||
@ -4864,6 +4867,7 @@ load_if_names()
|
||||
switch (af)
|
||||
{
|
||||
case AF_INET6:
|
||||
SETV6LOOPBACKADDRFOUND(*sa);
|
||||
# ifdef __KAME__
|
||||
/* convert into proper scoped address */
|
||||
if ((IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr) ||
|
||||
@ -5063,6 +5067,7 @@ load_if_names()
|
||||
|
||||
# if NETINET6
|
||||
case AF_INET6:
|
||||
SETV6LOOPBACKADDRFOUND(*sa);
|
||||
# ifdef __KAME__
|
||||
/* convert into proper scoped address */
|
||||
if ((IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr) ||
|
||||
@ -5928,6 +5933,9 @@ char *OsCompileOptions[] =
|
||||
#if HASWAITPID
|
||||
"HASWAITPID",
|
||||
#endif /* HASWAITPID */
|
||||
#if HAVE_NANOSLEEP
|
||||
"HAVE_NANOSLEEP",
|
||||
#endif /* HAVE_NANOSLEEP */
|
||||
#if IDENTPROTO
|
||||
"IDENTPROTO",
|
||||
#endif /* IDENTPROTO */
|
||||
@ -6018,6 +6026,9 @@ char *OsCompileOptions[] =
|
||||
#ifdef USESYSCTL
|
||||
"USESYSCTL",
|
||||
#endif /* USESYSCTL */
|
||||
#if USE_OPENSSL_ENGINE
|
||||
"USE_OPENSSL_ENGINE",
|
||||
#endif /* USE_OPENSSL_ENGINE */
|
||||
#if USING_NETSCAPE_LDAP
|
||||
"USING_NETSCAPE_LDAP",
|
||||
#endif /* USING_NETSCAPE_LDAP */
|
||||
@ -6321,7 +6332,7 @@ char *FFRCompileOptions[] =
|
||||
#endif /* _FFR_QUEUE_SCHED_DBG */
|
||||
#if _FFR_RCPTTHROTDELAY
|
||||
/* configurable delay for BadRcptThrottle */
|
||||
"_FFR_RCPTTHROTDELAY"
|
||||
"_FFR_RCPTTHROTDELAY",
|
||||
#endif /* _FFR_RCPTTHROTDELAY */
|
||||
#if _FFR_REDIRECTEMPTY
|
||||
/*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2007, 2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2007, 2009, 2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -14,7 +14,7 @@
|
||||
#include <sendmail.h>
|
||||
#include "map.h"
|
||||
|
||||
SM_RCSID("@(#)$Id: daemon.c,v 8.683 2009/12/18 01:12:40 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: daemon.c,v 8.691 2011/01/25 18:31:30 ca Exp $")
|
||||
|
||||
#if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__)
|
||||
# define USE_SOCK_STREAM 1
|
||||
@ -1267,7 +1267,8 @@ setupdaemon(daemonaddr)
|
||||
case AF_INET6:
|
||||
if (IN6_IS_ADDR_UNSPECIFIED(&daemonaddr->sin6.sin6_addr))
|
||||
daemonaddr->sin6.sin6_addr =
|
||||
LocalDaemon ? in6addr_loopback : in6addr_any;
|
||||
(LocalDaemon && V6LoopbackAddrFound) ?
|
||||
in6addr_loopback : in6addr_any;
|
||||
port = daemonaddr->sin6.sin6_port;
|
||||
break;
|
||||
#endif /* NETINET6 */
|
||||
@ -2219,7 +2220,8 @@ makeconnection(host, port, mci, e, enough)
|
||||
#if NETINET6
|
||||
case AF_INET6:
|
||||
if (IN6_IS_ADDR_UNSPECIFIED(&clt_addr.sin6.sin6_addr))
|
||||
clt_addr.sin6.sin6_addr = LocalDaemon ?
|
||||
clt_addr.sin6.sin6_addr =
|
||||
(LocalDaemon && V6LoopbackAddrFound) ?
|
||||
in6addr_loopback : in6addr_any;
|
||||
else
|
||||
clt_bind = true;
|
||||
@ -2665,6 +2667,7 @@ makeconnection(host, port, mci, e, enough)
|
||||
#if NETINET
|
||||
case AF_INET:
|
||||
addr.sin.sin_addr.s_addr = ConnectOnlyTo.sin.sin_addr.s_addr;
|
||||
addr.sa.sa_family = ConnectOnlyTo.sa.sa_family;
|
||||
break;
|
||||
#endif /* NETINET */
|
||||
|
||||
@ -2872,7 +2875,10 @@ makeconnection(host, port, mci, e, enough)
|
||||
|
||||
/* Use the configured HeloName as appropriate */
|
||||
if (HeloName != NULL && HeloName[0] != '\0')
|
||||
{
|
||||
SM_FREE_CLR(mci->mci_heloname);
|
||||
mci->mci_heloname = newstr(HeloName);
|
||||
}
|
||||
|
||||
mci_setstat(mci, EX_OK, NULL, NULL);
|
||||
return EX_OK;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -14,7 +14,7 @@
|
||||
#include <sendmail.h>
|
||||
#include <sm/time.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: deliver.c,v 8.1020 2009/12/18 17:08:01 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: deliver.c,v 8.1024 2011/01/12 23:52:59 ca Exp $")
|
||||
|
||||
#if HASSETUSERCONTEXT
|
||||
# include <login_cap.h>
|
||||
@ -1850,7 +1850,7 @@ deliver(e, firstto)
|
||||
** If we are running SMTP, we just need to clean up.
|
||||
*/
|
||||
|
||||
/* XXX this seems a bit wierd */
|
||||
/* XXX this seems a bit weird */
|
||||
if (ctladdr == NULL && m != ProgMailer && m != FileMailer &&
|
||||
bitset(QGOODUID, e->e_from.q_flags))
|
||||
ctladdr = &e->e_from;
|
||||
@ -2144,6 +2144,7 @@ deliver(e, firstto)
|
||||
mci->mci_lastuse = curtime();
|
||||
mci->mci_deliveries = 0;
|
||||
mci->mci_exitstat = i;
|
||||
mci_clr_extensions(mci);
|
||||
# if NAMED_BIND
|
||||
mci->mci_herrno = h_errno;
|
||||
# endif /* NAMED_BIND */
|
||||
@ -3104,7 +3105,7 @@ deliver(e, firstto)
|
||||
mci->mci_state != MCIS_CLOSED)
|
||||
{
|
||||
SET_HELO(mci->mci_flags);
|
||||
mci->mci_flags &= ~MCIF_EXTENS;
|
||||
mci_clr_extensions(mci);
|
||||
goto reconnect;
|
||||
}
|
||||
}
|
||||
@ -3157,7 +3158,7 @@ deliver(e, firstto)
|
||||
&mci->mci_out,
|
||||
mci->mci_conn, tmo) == 0)
|
||||
{
|
||||
mci->mci_flags &= ~MCIF_EXTENS;
|
||||
mci_clr_extensions(mci);
|
||||
mci->mci_flags |= MCIF_AUTHACT|
|
||||
MCIF_ONLY_EHLO;
|
||||
goto reconnect;
|
||||
@ -6111,12 +6112,13 @@ starttls(m, mci, e)
|
||||
return EX_TEMPFAIL;
|
||||
|
||||
# if USE_OPENSSL_ENGINE
|
||||
if (!SSL_set_engine(NULL))
|
||||
if (!SSLEngineInitialized && !SSL_set_engine(NULL))
|
||||
{
|
||||
sm_syslog(LOG_ERR, NOQID,
|
||||
"STARTTLS=client, SSL_set_engine=failed");
|
||||
return EX_TEMPFAIL;
|
||||
}
|
||||
SSLEngineInitialized = true;
|
||||
# endif /* USE_OPENSSL_ENGINE */
|
||||
|
||||
smtpmessage("STARTTLS", m, mci);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2004, 2006 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2004, 2006, 2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1986, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -15,9 +15,9 @@
|
||||
#include "map.h"
|
||||
|
||||
#if NAMED_BIND
|
||||
SM_RCSID("@(#)$Id: domain.c,v 8.202 2006/12/19 01:15:07 ca Exp $ (with name server)")
|
||||
SM_RCSID("@(#)$Id: domain.c,v 8.204 2010/06/29 15:35:33 ca Exp $ (with name server)")
|
||||
#else /* NAMED_BIND */
|
||||
SM_RCSID("@(#)$Id: domain.c,v 8.202 2006/12/19 01:15:07 ca Exp $ (without name server)")
|
||||
SM_RCSID("@(#)$Id: domain.c,v 8.204 2010/06/29 15:35:33 ca Exp $ (without name server)")
|
||||
#endif /* NAMED_BIND */
|
||||
|
||||
#if NAMED_BIND
|
||||
@ -25,25 +25,6 @@ SM_RCSID("@(#)$Id: domain.c,v 8.202 2006/12/19 01:15:07 ca Exp $ (without name s
|
||||
# include <arpa/inet.h>
|
||||
|
||||
|
||||
/*
|
||||
** The standard udp packet size PACKETSZ (512) is not sufficient for some
|
||||
** nameserver answers containing very many resource records. The resolver
|
||||
** may switch to tcp and retry if it detects udp packet overflow.
|
||||
** Also note that the resolver routines res_query and res_search return
|
||||
** the size of the *un*truncated answer in case the supplied answer buffer
|
||||
** it not big enough to accommodate the entire answer.
|
||||
*/
|
||||
|
||||
# ifndef MAXPACKET
|
||||
# define MAXPACKET 8192 /* max packet size used internally by BIND */
|
||||
# endif /* ! MAXPACKET */
|
||||
|
||||
typedef union
|
||||
{
|
||||
HEADER qb1;
|
||||
unsigned char qb2[MAXPACKET];
|
||||
} querybuf;
|
||||
|
||||
# ifndef MXHOSTBUFSIZE
|
||||
# define MXHOSTBUFSIZE (128 * MAXMXHOSTS)
|
||||
# endif /* ! MXHOSTBUFSIZE */
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: envelope.c,v 8.310 2009/12/18 17:08:01 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: envelope.c,v 8.312 2010/02/03 16:36:40 ca Exp $")
|
||||
|
||||
/*
|
||||
** CLRSESSENVELOPE -- clear session oriented data in an envelope
|
||||
@ -246,12 +246,14 @@ dropenvelope(e, fulldrop, split)
|
||||
e->e_flags |= EF_FATALERRS|EF_CLRQUEUE;
|
||||
}
|
||||
|
||||
|
||||
e->e_flags &= ~EF_QUEUERUN;
|
||||
for (q = e->e_sendqueue; q != NULL; q = q->q_next)
|
||||
{
|
||||
if (QS_IS_UNDELIVERED(q->q_state))
|
||||
queueit = true;
|
||||
|
||||
|
||||
/* see if a notification is needed */
|
||||
if (bitset(QPINGONFAILURE, q->q_flags) &&
|
||||
((IS_MSG_ERR(msg_timeout) &&
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2003, 2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
#include <sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: err.c,v 8.196 2006/11/10 23:14:08 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: err.c,v 8.205 2010/02/03 23:22:41 ca Exp $")
|
||||
|
||||
#if LDAPMAP
|
||||
# include <lber.h>
|
||||
@ -359,7 +359,7 @@ usrerr(fmt, va_alist)
|
||||
** increments Errors.
|
||||
*/
|
||||
|
||||
/*VARARGS1*/
|
||||
/*VARARGS2*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
usrerrenh(char *enhsc, const char *fmt, ...)
|
||||
@ -427,6 +427,7 @@ usrerrenh(enhsc, fmt, va_alist)
|
||||
if (QuickAbort)
|
||||
sm_exc_raisenew_x(&EtypeQuickAbort, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
** MESSAGE -- print message (not necessarily an error)
|
||||
**
|
||||
@ -473,11 +474,12 @@ message(msg, va_alist)
|
||||
case '5':
|
||||
if (CurEnv->e_rpool == NULL && CurEnv->e_message != NULL)
|
||||
sm_free(CurEnv->e_message);
|
||||
CurEnv->e_message =
|
||||
sm_rpool_strdup_x(CurEnv->e_rpool, errtxt);
|
||||
CurEnv->e_message = sm_rpool_strdup_x(CurEnv->e_rpool, errtxt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** NMESSAGE -- print message (not necessarily an error)
|
||||
**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2006, 2008, 2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2006, 2008, 2009, 2011 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -26,7 +26,7 @@ SM_UNUSED(static char copyright[]) =
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
#endif /* ! lint */
|
||||
|
||||
SM_RCSID("@(#)$Id: main.c,v 8.971 2009/12/18 17:08:01 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: main.c,v 8.976 2011/03/15 23:14:36 ca Exp $")
|
||||
|
||||
|
||||
#if NETINET || NETINET6
|
||||
@ -304,6 +304,9 @@ main(argc, argv, envp)
|
||||
SubmitMode = SUBMIT_UNKNOWN;
|
||||
#if _FFR_LOCAL_DAEMON
|
||||
LocalDaemon = false;
|
||||
# if NETINET6
|
||||
V6LoopbackAddrFound = false;
|
||||
# endif /* NETINET6 */
|
||||
#endif /* _FFR_LOCAL_DAEMON */
|
||||
#if XDEBUG
|
||||
checkfd012("after openlog");
|
||||
@ -1308,7 +1311,7 @@ main(argc, argv, envp)
|
||||
(void) getfallbackmxrr(FallbackMX);
|
||||
#endif /* NAMED_BIND */
|
||||
|
||||
if (SuperSafe == SAFE_INTERACTIVE && CurEnv->e_sendmode != SM_DELIVER)
|
||||
if (SuperSafe == SAFE_INTERACTIVE && !SM_IS_INTERACTIVE(CurEnv->e_sendmode))
|
||||
{
|
||||
(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
|
||||
"WARNING: SuperSafe=interactive should only be used with\n DeliveryMode=interactive\n");
|
||||
@ -3190,7 +3193,7 @@ sigpipe(sig)
|
||||
** may resend a message.
|
||||
**
|
||||
** Parameters:
|
||||
** none.
|
||||
** sig -- incoming signal.
|
||||
**
|
||||
** Returns:
|
||||
** none.
|
||||
@ -3201,8 +3204,6 @@ sigpipe(sig)
|
||||
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
|
||||
** ANYTHING TO THIS ROUTINE UNLESS YOU KNOW WHAT YOU ARE
|
||||
** DOING.
|
||||
**
|
||||
** XXX: More work is needed for this signal handler.
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
@ -3217,38 +3218,34 @@ intsig(sig)
|
||||
errno = save_errno;
|
||||
CHECK_CRITICAL(sig);
|
||||
sm_allsignals(true);
|
||||
IntSig = true;
|
||||
|
||||
if (sig != 0 && LogLevel > 79)
|
||||
sm_syslog(LOG_DEBUG, CurEnv->e_id, "interrupt");
|
||||
FileName = NULL;
|
||||
|
||||
/* Clean-up on aborted stdin message submission */
|
||||
if (CurEnv->e_id != NULL &&
|
||||
(OpMode == MD_SMTP ||
|
||||
if (OpMode == MD_SMTP ||
|
||||
OpMode == MD_DELIVER ||
|
||||
OpMode == MD_ARPAFTP))
|
||||
OpMode == MD_ARPAFTP)
|
||||
{
|
||||
register ADDRESS *q;
|
||||
if (CurEnv->e_id != NULL)
|
||||
{
|
||||
char *fn;
|
||||
|
||||
/* don't return an error indication */
|
||||
CurEnv->e_to = NULL;
|
||||
CurEnv->e_flags &= ~EF_FATALERRS;
|
||||
CurEnv->e_flags |= EF_CLRQUEUE;
|
||||
|
||||
/*
|
||||
** Spin through the addresses and
|
||||
** mark them dead to prevent bounces
|
||||
*/
|
||||
|
||||
for (q = CurEnv->e_sendqueue; q != NULL; q = q->q_next)
|
||||
q->q_state = QS_DONTSEND;
|
||||
|
||||
drop = true;
|
||||
fn = queuename(CurEnv, DATAFL_LETTER);
|
||||
if (fn != NULL)
|
||||
(void) unlink(fn);
|
||||
fn = queuename(CurEnv, ANYQFL_LETTER);
|
||||
if (fn != NULL)
|
||||
(void) unlink(fn);
|
||||
}
|
||||
_exit(EX_OK);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
else if (OpMode != MD_TEST)
|
||||
{
|
||||
|
||||
if (sig != 0 && LogLevel > 79)
|
||||
sm_syslog(LOG_DEBUG, CurEnv->e_id, "interrupt");
|
||||
if (OpMode != MD_TEST)
|
||||
unlockqueue(CurEnv);
|
||||
}
|
||||
|
||||
finis(drop, false, EX_OK);
|
||||
/* NOTREACHED */
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: map.c,v 8.705 2009/08/11 22:22:40 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: map.c,v 8.706 2010/07/27 03:35:42 ca Exp $")
|
||||
|
||||
#if LDAPMAP
|
||||
# include <sm/ldap.h>
|
||||
@ -5985,7 +5985,7 @@ stab_map_store(map, lhs, rhs)
|
||||
/*
|
||||
** STAB_MAP_OPEN -- initialize (reads data file)
|
||||
**
|
||||
** This is a wierd case -- it is only intended as a fallback for
|
||||
** This is a weird case -- it is only intended as a fallback for
|
||||
** aliases. For this reason, opens for write (only during a
|
||||
** "newaliases") always fails, and opens for read open the
|
||||
** actual underlying text file instead of the database.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2005, 2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
#include <sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: mci.c,v 8.221 2007/11/13 23:44:25 gshapiro Exp $")
|
||||
SM_RCSID("@(#)$Id: mci.c,v 8.223 2010/03/10 04:35:28 ca Exp $")
|
||||
|
||||
#if NETINET || NETINET6
|
||||
# include <arpa/inet.h>
|
||||
@ -288,6 +288,32 @@ mci_flush(doquit, allbut)
|
||||
mci_uncache(&MciCache[i], doquit);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** MCI_CLR_EXTENSIONS -- clear knowledge about SMTP extensions
|
||||
**
|
||||
** Parameters:
|
||||
** mci -- the connection to clear.
|
||||
**
|
||||
** Returns:
|
||||
** none.
|
||||
*/
|
||||
|
||||
void
|
||||
mci_clr_extensions(mci)
|
||||
MCI *mci;
|
||||
{
|
||||
if (mci == NULL)
|
||||
return;
|
||||
|
||||
mci->mci_flags &= ~MCIF_EXTENS;
|
||||
mci->mci_maxsize = 0;
|
||||
mci->mci_min_by = 0;
|
||||
#if SASL
|
||||
mci->mci_saslcap = NULL;
|
||||
#endif /* SASL */
|
||||
}
|
||||
|
||||
/*
|
||||
** MCI_GET -- get information about a particular host
|
||||
**
|
||||
@ -567,6 +593,7 @@ static struct mcifbits MciFlags[] =
|
||||
{ MCIF_CVT7TO8, "CVT7TO8" },
|
||||
{ MCIF_INMIME, "INMIME" },
|
||||
{ MCIF_AUTH, "AUTH" },
|
||||
{ MCIF_AUTH2, "AUTH2" },
|
||||
{ MCIF_AUTHACT, "AUTHACT" },
|
||||
{ MCIF_ENHSTAT, "ENHSTAT" },
|
||||
{ MCIF_PIPELINED, "PIPELINED" },
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: parseaddr.c,v 8.403 2008/02/08 02:27:35 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: parseaddr.c,v 8.404 2010/07/27 03:35:42 ca Exp $")
|
||||
|
||||
#include <sm/sendmail.h>
|
||||
#include "map.h"
|
||||
@ -319,7 +319,7 @@ invalidaddr(addr, delimptr, isrcpt)
|
||||
** is invalid and should be "repaired".
|
||||
**
|
||||
** Returns:
|
||||
** true -- if the address has any "wierd" characters or
|
||||
** true -- if the address has any "weird" characters or
|
||||
** non-printable characters or if a quote is unbalanced.
|
||||
** false -- otherwise.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2009, 2011 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -14,7 +14,7 @@
|
||||
#include <sendmail.h>
|
||||
#include <sm/sem.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: queue.c,v 8.987 2009/12/18 17:08:01 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: queue.c,v 8.991 2011/03/15 23:14:36 ca Exp $")
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
@ -203,7 +203,7 @@ static const char *FSPath[MAXFILESYS]; /* pathnames for file systems */
|
||||
** tag -- should be a unique id to avoid misinterpretations by others.
|
||||
** idea: hash over configuration data that will be stored here.
|
||||
** NumFileSys -- number of file systems.
|
||||
** FileSys -- (arrary of) structure for used file systems.
|
||||
** FileSys -- (array of) structure for used file systems.
|
||||
** RSATmpCnt -- counter for number of uses of ephemeral RSA key.
|
||||
** QShm -- (array of) structure for information about queue directories.
|
||||
*/
|
||||
@ -633,7 +633,6 @@ queueup(e, announce, msync)
|
||||
}
|
||||
|
||||
/* output inode number of data file */
|
||||
/* XXX should probably include device major/minor too */
|
||||
if (e->e_dfino != -1)
|
||||
{
|
||||
(void) sm_io_fprintf(tfp, SM_TIME_DEFAULT, "I%ld/%ld/%llu\n",
|
||||
@ -5195,7 +5194,11 @@ queuename(e, type)
|
||||
|
||||
/* Assign an ID if needed */
|
||||
if (e->e_id == NULL)
|
||||
{
|
||||
if (IntSig)
|
||||
return NULL;
|
||||
assign_queueid(e);
|
||||
}
|
||||
type = queue_letter(e, type);
|
||||
|
||||
/* begin of filename */
|
||||
@ -5239,7 +5242,11 @@ queuename(e, type)
|
||||
else
|
||||
{
|
||||
if (e->e_qgrp == NOQGRP || e->e_qdir == NOQDIR)
|
||||
{
|
||||
if (IntSig)
|
||||
return NULL;
|
||||
(void) setnewqueue(e);
|
||||
}
|
||||
if (type == DATAFL_LETTER)
|
||||
{
|
||||
qd = e->e_dfqdir;
|
||||
@ -5279,6 +5286,8 @@ queuename(e, type)
|
||||
break;
|
||||
|
||||
default:
|
||||
if (IntSig)
|
||||
return NULL;
|
||||
sm_abort("queuename: bad queue file type %d", type);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2006, 2008, 2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2006, 2008-2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -14,12 +14,13 @@
|
||||
#include <sendmail.h>
|
||||
#include <sm/sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: readcf.c,v 8.674 2009/10/26 17:47:00 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: readcf.c,v 8.684 2011/03/15 17:29:29 guenther Exp $")
|
||||
|
||||
#if NETINET || NETINET6
|
||||
# include <arpa/inet.h>
|
||||
#endif /* NETINET || NETINET6 */
|
||||
|
||||
|
||||
#define SECONDS
|
||||
#define MINUTES * 60
|
||||
#define HOUR * 3600
|
||||
@ -114,7 +115,15 @@ readcf(cfname, safe, e)
|
||||
LineNumber = 0;
|
||||
|
||||
#if STARTTLS
|
||||
Srv_SSL_Options = Clt_SSL_Options = SSL_OP_ALL;
|
||||
Srv_SSL_Options = SSL_OP_ALL;
|
||||
Clt_SSL_Options = SSL_OP_ALL
|
||||
#ifdef SSL_OP_NO_SSLv2
|
||||
| SSL_OP_NO_SSLv2
|
||||
#endif
|
||||
#ifdef SSL_OP_NO_TICKET
|
||||
| SSL_OP_NO_TICKET
|
||||
#endif
|
||||
;
|
||||
#endif /* STARTTLS */
|
||||
if (DontLockReadFiles)
|
||||
sff |= SFF_NOLOCK;
|
||||
@ -2271,6 +2280,10 @@ static struct optioninfo
|
||||
# define O_RCPTTHROTDELAY 0xe6
|
||||
{ "BadRcptThrottleDelay", O_RCPTTHROTDELAY, OI_SAFE },
|
||||
#endif /* _FFR_RCPTTHROTDELAY */
|
||||
#if 0 && _FFR_QOS && defined(SOL_IP) && defined(IP_TOS)
|
||||
# define O_INETQOS 0xe7 /* reserved for FFR_QOS */
|
||||
{ "InetQoS", O_INETQOS, OI_NONE },
|
||||
#endif
|
||||
|
||||
{ NULL, '\0', OI_NONE }
|
||||
};
|
||||
@ -2285,68 +2298,85 @@ static struct ssl_options
|
||||
/* these are turned on by default */
|
||||
#ifdef SSL_OP_MICROSOFT_SESS_ID_BUG
|
||||
{ "SSL_OP_MICROSOFT_SESS_ID_BUG", SSL_OP_MICROSOFT_SESS_ID_BUG },
|
||||
#endif /* SSL_OP_MICROSOFT_SESS_ID_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_NETSCAPE_CHALLENGE_BUG
|
||||
{ "SSL_OP_NETSCAPE_CHALLENGE_BUG", SSL_OP_NETSCAPE_CHALLENGE_BUG },
|
||||
#endif /* SSL_OP_NETSCAPE_CHALLENGE_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
|
||||
{ "SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG", SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG },
|
||||
#endif /* SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
|
||||
{ "SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG", SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG },
|
||||
#endif /* SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
|
||||
{ "SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER", SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER },
|
||||
#endif /* SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER */
|
||||
#endif
|
||||
#ifdef SSL_OP_MSIE_SSLV2_RSA_PADDING
|
||||
{ "SSL_OP_MSIE_SSLV2_RSA_PADDING", SSL_OP_MSIE_SSLV2_RSA_PADDING },
|
||||
#endif /* SSL_OP_MSIE_SSLV2_RSA_PADDING */
|
||||
#endif
|
||||
#ifdef SSL_OP_SSLEAY_080_CLIENT_DH_BUG
|
||||
{ "SSL_OP_SSLEAY_080_CLIENT_DH_BUG", SSL_OP_SSLEAY_080_CLIENT_DH_BUG },
|
||||
#endif /* SSL_OP_SSLEAY_080_CLIENT_DH_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_TLS_D5_BUG
|
||||
{ "SSL_OP_TLS_D5_BUG", SSL_OP_TLS_D5_BUG },
|
||||
#endif /* SSL_OP_TLS_D5_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_TLS_BLOCK_PADDING_BUG
|
||||
{ "SSL_OP_TLS_BLOCK_PADDING_BUG", SSL_OP_TLS_BLOCK_PADDING_BUG },
|
||||
#endif /* SSL_OP_TLS_BLOCK_PADDING_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
|
||||
{ "SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS", SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS },
|
||||
#endif /* SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS */
|
||||
#endif
|
||||
#ifdef SSL_OP_ALL
|
||||
{ "SSL_OP_ALL", SSL_OP_ALL },
|
||||
#endif
|
||||
#ifdef SSL_OP_NO_QUERY_MTU
|
||||
{ "SSL_OP_NO_QUERY_MTU", SSL_OP_NO_QUERY_MTU },
|
||||
#endif
|
||||
#ifdef SSL_OP_COOKIE_EXCHANGE
|
||||
{ "SSL_OP_COOKIE_EXCHANGE", SSL_OP_COOKIE_EXCHANGE },
|
||||
#endif
|
||||
#ifdef SSL_OP_NO_TICKET
|
||||
{ "SSL_OP_NO_TICKET", SSL_OP_NO_TICKET },
|
||||
#endif
|
||||
#ifdef SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
|
||||
{ "SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION", SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION },
|
||||
#endif /* SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION */
|
||||
#endif
|
||||
#ifdef SSL_OP_SINGLE_ECDH_USE
|
||||
{ "SSL_OP_SINGLE_ECDH_USE", SSL_OP_SINGLE_ECDH_USE },
|
||||
#endif
|
||||
#ifdef SSL_OP_SINGLE_DH_USE
|
||||
{ "SSL_OP_SINGLE_DH_USE", SSL_OP_SINGLE_DH_USE },
|
||||
#endif
|
||||
#ifdef SSL_OP_EPHEMERAL_RSA
|
||||
{ "SSL_OP_EPHEMERAL_RSA", SSL_OP_EPHEMERAL_RSA },
|
||||
#endif /* SSL_OP_EPHEMERAL_RSA */
|
||||
#endif
|
||||
#ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
|
||||
{ "SSL_OP_CIPHER_SERVER_PREFERENCE", SSL_OP_CIPHER_SERVER_PREFERENCE },
|
||||
#endif /* SSL_OP_CIPHER_SERVER_PREFERENCE */
|
||||
#endif
|
||||
#ifdef SSL_OP_TLS_ROLLBACK_BUG
|
||||
{ "SSL_OP_TLS_ROLLBACK_BUG", SSL_OP_TLS_ROLLBACK_BUG },
|
||||
#endif /* SSL_OP_TLS_ROLLBACK_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_NO_SSLv2
|
||||
{ "SSL_OP_NO_SSLv2", SSL_OP_NO_SSLv2 },
|
||||
#endif /* SSL_OP_NO_SSLv2 */
|
||||
#endif
|
||||
#ifdef SSL_OP_NO_SSLv3
|
||||
{ "SSL_OP_NO_SSLv3", SSL_OP_NO_SSLv3 },
|
||||
#endif /* SSL_OP_NO_SSLv3 */
|
||||
#endif
|
||||
#ifdef SSL_OP_NO_TLSv1
|
||||
{ "SSL_OP_NO_TLSv1", SSL_OP_NO_TLSv1 },
|
||||
#endif /* SSL_OP_NO_TLSv1 */
|
||||
#endif
|
||||
#ifdef SSL_OP_PKCS1_CHECK_1
|
||||
{ "SSL_OP_PKCS1_CHECK_1", SSL_OP_PKCS1_CHECK_1 },
|
||||
#endif /* SSL_OP_PKCS1_CHECK_1 */
|
||||
#endif
|
||||
#ifdef SSL_OP_PKCS1_CHECK_2
|
||||
{ "SSL_OP_PKCS1_CHECK_2", SSL_OP_PKCS1_CHECK_2 },
|
||||
#endif /* SSL_OP_PKCS1_CHECK_2 */
|
||||
#endif
|
||||
#ifdef SSL_OP_NETSCAPE_CA_DN_BUG
|
||||
{ "SSL_OP_NETSCAPE_CA_DN_BUG", SSL_OP_NETSCAPE_CA_DN_BUG },
|
||||
#endif /* SSL_OP_NETSCAPE_CA_DN_BUG */
|
||||
#endif
|
||||
#ifdef SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
|
||||
{ "SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG", SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG },
|
||||
#endif /* SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG */
|
||||
#endif
|
||||
{ NULL, 0 }
|
||||
};
|
||||
#endif /* STARTTLS && _FFR_TLS_1 */
|
||||
@ -2639,6 +2669,7 @@ setoption(opt, val, safe, sticky, e)
|
||||
set_delivery_mode(*val, e);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
syserr("Unknown delivery mode %c", *val);
|
||||
finis(false, true, EX_USAGE);
|
||||
@ -3446,7 +3477,7 @@ setoption(opt, val, safe, sticky, e)
|
||||
ConnectOnlyTo.sa.sa_family = AF_UNSPEC;
|
||||
# if NETINET6
|
||||
if (anynet_pton(AF_INET6, val,
|
||||
&ConnectOnlyTo.sin6.sin6_addr) != 1)
|
||||
&ConnectOnlyTo.sin6.sin6_addr) == 1)
|
||||
ConnectOnlyTo.sa.sa_family = AF_INET6;
|
||||
else
|
||||
# endif /* NETINET6 */
|
||||
|
@ -9,9 +9,9 @@
|
||||
.\" the sendmail distribution.
|
||||
.\"
|
||||
.\"
|
||||
.\" $Id: sendmail.8,v 8.59 2009/04/10 17:49:19 gshapiro Exp $
|
||||
.\" $Id: sendmail.8,v 8.60 2011/03/07 23:44:48 ca Exp $
|
||||
.\"
|
||||
.TH SENDMAIL 8 "$Date: 2009/04/10 17:49:19 $"
|
||||
.TH SENDMAIL 8 "$Date: 2011/03/07 23:44:48 $"
|
||||
.SH NAME
|
||||
sendmail
|
||||
\- an electronic mail transport agent
|
||||
@ -224,7 +224,9 @@ If not specified,
|
||||
``Received:'' lines in the message are counted.
|
||||
.TP
|
||||
.B \-i
|
||||
Ignore dots alone on lines by themselves in incoming messages.
|
||||
Do not strip a leading dot from lines in incoming messages,
|
||||
and do not treat a dot on a line by itself
|
||||
as the end of an incoming message.
|
||||
This should be set if you are reading data from a file.
|
||||
.TP
|
||||
.BI "\-L " tag
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
#ifdef _DEFINE
|
||||
# ifndef lint
|
||||
SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1068 2009/12/18 17:08:01 ca Exp $";
|
||||
SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1089 2011/03/15 23:14:36 ca Exp $";
|
||||
# endif /* ! lint */
|
||||
#endif /* _DEFINE */
|
||||
|
||||
@ -327,7 +327,7 @@ typedef struct address ADDRESS;
|
||||
(s) == QS_SENT || \
|
||||
(s) == QS_DISCARDED)
|
||||
#define QS_IS_DEAD(s) ((s) >= QS_DONTSEND)
|
||||
|
||||
#define QS_IS_TEMPFAIL(s) ((s) == QS_QUEUEUP || (s) == QS_RETRY)
|
||||
|
||||
#define NULLADDR ((ADDRESS *) NULL)
|
||||
|
||||
@ -721,17 +721,20 @@ MCI
|
||||
#if STARTTLS
|
||||
#define MCIF_TLS 0x00100000 /* STARTTLS supported */
|
||||
#define MCIF_TLSACT 0x00200000 /* STARTTLS active */
|
||||
#define MCIF_EXTENS (MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT | MCIF_TLS)
|
||||
#else /* STARTTLS */
|
||||
#define MCIF_EXTENS (MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT)
|
||||
#define MCIF_TLS 0
|
||||
#define MCIF_TLSACT 0
|
||||
#endif /* STARTTLS */
|
||||
#define MCIF_DLVR_BY 0x00400000 /* DELIVERBY */
|
||||
#if _FFR_IGNORE_EXT_ON_HELO
|
||||
# define MCIF_HELO 0x00800000 /* we used HELO: ignore extensions */
|
||||
#endif /* _FFR_IGNORE_EXT_ON_HELO */
|
||||
#define MCIF_INLONGLINE 0x01000000 /* in the middle of a long line */
|
||||
#define MCIF_AUTH2 0x02000000 /* got 2 AUTH lines */
|
||||
#define MCIF_ONLY_EHLO 0x10000000 /* use only EHLO in smtpinit */
|
||||
|
||||
#define MCIF_EXTENS (MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT | MCIF_TLS | MCIF_AUTH2)
|
||||
|
||||
/* states */
|
||||
#define MCIS_CLOSED 0 /* no traffic on this connection */
|
||||
#define MCIS_OPENING 1 /* sending initial protocol */
|
||||
@ -749,6 +752,7 @@ extern void mci_close __P((MCI *, char *where));
|
||||
extern void mci_dump __P((SM_FILE_T *, MCI *, bool));
|
||||
extern void mci_dump_all __P((SM_FILE_T *, bool));
|
||||
extern void mci_flush __P((bool, MCI *));
|
||||
extern void mci_clr_extensions __P((MCI *));
|
||||
extern MCI *mci_get __P((char *, MAILER *));
|
||||
extern int mci_lock_host __P((MCI *));
|
||||
extern bool mci_match __P((char *, MAILER *));
|
||||
@ -1167,6 +1171,33 @@ struct hostsig_t
|
||||
|
||||
typedef struct hostsig_t HOSTSIG_T;
|
||||
|
||||
/*
|
||||
** The standard udp packet size PACKETSZ (512) is not sufficient for some
|
||||
** nameserver answers containing very many resource records. The resolver
|
||||
** may switch to tcp and retry if it detects udp packet overflow.
|
||||
** Also note that the resolver routines res_query and res_search return
|
||||
** the size of the *un*truncated answer in case the supplied answer buffer
|
||||
** it not big enough to accommodate the entire answer.
|
||||
*/
|
||||
|
||||
# ifndef MAXPACKET
|
||||
# define MAXPACKET 8192 /* max packet size used internally by BIND */
|
||||
# endif /* ! MAXPACKET */
|
||||
|
||||
/*
|
||||
** The resolver functions res_{send,query,querydomain} expect the
|
||||
** answer buffer to be aligned, but some versions of gcc4 reverse
|
||||
** 25 years of history and no longer align char buffers on the
|
||||
** stack, resulting in crashes on strict-alignment platforms. Use
|
||||
** this union when putting the buffer on the stack to force the
|
||||
** alignment, then cast to (HEADER *) or (unsigned char *) as needed.
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
HEADER qb1;
|
||||
unsigned char qb2[MAXPACKET];
|
||||
} querybuf;
|
||||
|
||||
/* functions */
|
||||
extern bool getcanonname __P((char *, int, bool, int *));
|
||||
extern int getmxrr __P((char *, char **, unsigned short *, bool, int *, bool, int *));
|
||||
@ -1246,11 +1277,15 @@ MAP
|
||||
#define MF_OPENBOGUS 0x00800000 /* open failed, don't call map_close */
|
||||
#define MF_CLOSING 0x01000000 /* map is being closed */
|
||||
|
||||
#define DYNOPENMAP(map) if (!bitset(MF_OPEN, (map)->map_mflags)) \
|
||||
{ \
|
||||
if (!openmap(map)) \
|
||||
return NULL; \
|
||||
}
|
||||
#define DYNOPENMAP(map) \
|
||||
do \
|
||||
{ \
|
||||
if (!bitset(MF_OPEN, (map)->map_mflags)) \
|
||||
{ \
|
||||
if (!openmap(map)) \
|
||||
return NULL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* indices for map_actions */
|
||||
@ -1569,8 +1604,19 @@ extern void stabapply __P((void (*)(STAB *, int), int));
|
||||
|
||||
#if _FFR_LOCAL_DAEMON
|
||||
EXTERN bool LocalDaemon;
|
||||
# if NETINET6
|
||||
EXTERN bool V6LoopbackAddrFound; /* found an IPv6 loopback address */
|
||||
# define SETV6LOOPBACKADDRFOUND(sa) \
|
||||
do \
|
||||
{ \
|
||||
if (isloopback(sa)) \
|
||||
V6LoopbackAddrFound = true; \
|
||||
} while (0)
|
||||
# endif /* NETINET6 */
|
||||
#else /* _FFR_LOCAL_DAEMON */
|
||||
# define LocalDaemon false
|
||||
# define V6LoopbackAddrFound false
|
||||
# define SETV6LOOPBACKADDRFOUND(sa)
|
||||
#endif /* _FFR_LOCAL_DAEMON */
|
||||
|
||||
/* Note: see also include/sendmail/pathnames.h: GET_CLIENT_CF */
|
||||
@ -1585,6 +1631,7 @@ EXTERN bool LocalDaemon;
|
||||
#define SM_DEFER 'd' /* defer map lookups as well as queue */
|
||||
#define SM_VERIFY 'v' /* verify only (used internally) */
|
||||
#define DM_NOTSET (-1) /* DeliveryMode (per daemon) option not set */
|
||||
# define SM_IS_INTERACTIVE(m) ((m) == SM_DELIVER)
|
||||
|
||||
#define WILL_BE_QUEUED(m) ((m) == SM_QUEUE || (m) == SM_DEFER)
|
||||
|
||||
@ -2100,7 +2147,11 @@ extern void inittimeouts __P((char *, bool));
|
||||
*/
|
||||
|
||||
/* macros for debugging flags */
|
||||
#define tTd(flag, level) (tTdvect[flag] >= (unsigned char)level)
|
||||
#if NOT_SENDMAIL
|
||||
# define tTd(flag, level) (tTdvect[flag] >= (unsigned char)level)
|
||||
#else
|
||||
# define tTd(flag, level) (tTdvect[flag] >= (unsigned char)level && !IntSig)
|
||||
#endif
|
||||
#define tTdlevel(flag) (tTdvect[flag])
|
||||
|
||||
/* variables */
|
||||
@ -2123,22 +2174,26 @@ extern unsigned char tTdvect[100]; /* trace vector */
|
||||
*/
|
||||
|
||||
/* set exit status */
|
||||
#define setstat(s) { \
|
||||
if (ExitStat == EX_OK || ExitStat == EX_TEMPFAIL) \
|
||||
ExitStat = s; \
|
||||
}
|
||||
#define setstat(s) \
|
||||
do \
|
||||
{ \
|
||||
if (ExitStat == EX_OK || ExitStat == EX_TEMPFAIL) \
|
||||
ExitStat = s; \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define STRUCTCOPY(s, d) d = s
|
||||
|
||||
/* free a pointer if it isn't NULL and set it to NULL */
|
||||
#define SM_FREE_CLR(p) \
|
||||
if ((p) != NULL) \
|
||||
{ \
|
||||
sm_free(p); \
|
||||
(p) = NULL; \
|
||||
} \
|
||||
else
|
||||
do \
|
||||
{ \
|
||||
if ((p) != NULL) \
|
||||
{ \
|
||||
sm_free(p); \
|
||||
(p) = NULL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
** Update a permanent string variable with a new value.
|
||||
@ -2185,6 +2240,15 @@ extern unsigned char tTdvect[100]; /* trace vector */
|
||||
#define XS_DEFAULT 0
|
||||
#define XS_STARTTLS 1
|
||||
#define XS_AUTH 2
|
||||
#define XS_GREET 3
|
||||
#define XS_EHLO 4
|
||||
#define XS_MAIL 5
|
||||
#define XS_RCPT 6
|
||||
#define XS_DATA 7
|
||||
#define XS_EOM 8
|
||||
#define XS_DATA2 9
|
||||
#define XS_RCPT2 10
|
||||
#define XS_QUIT 15
|
||||
|
||||
/*
|
||||
** Global variables.
|
||||
@ -2363,6 +2427,7 @@ EXTERN char *RunAsUserName; /* user to become for bulk of run */
|
||||
EXTERN char *SafeFileEnv; /* chroot location for file delivery */
|
||||
EXTERN char *ServiceSwitchFile; /* backup service switch */
|
||||
EXTERN char *volatile ShutdownRequest;/* a sendmail shutdown has been requested */
|
||||
EXTERN bool volatile IntSig;
|
||||
EXTERN char *SmtpGreeting; /* SMTP greeting message (old $e macro) */
|
||||
EXTERN char *SmtpPhase; /* current phase in SMTP processing */
|
||||
EXTERN char SmtpError[MAXLINE]; /* save failure error messages */
|
||||
@ -2390,6 +2455,9 @@ extern const SM_EXC_TYPE_T EtypeQuickAbort; /* type of a QuickAbort exception */
|
||||
|
||||
|
||||
EXTERN int ConnectionRateWindowSize;
|
||||
#if STARTTLS && USE_OPENSSL_ENGINE
|
||||
EXTERN bool SSLEngineInitialized;
|
||||
#endif /* STARTTLS && USE_OPENSSL_ENGINE */
|
||||
|
||||
/*
|
||||
** Declarations of useful functions
|
||||
@ -2442,6 +2510,8 @@ extern int smtprcpt __P((ADDRESS *, MAILER *, MCI *, ENVELOPE *, ADDRESS *, time
|
||||
extern void smtprset __P((MAILER *, MCI *, ENVELOPE *));
|
||||
|
||||
#define REPLYTYPE(r) ((r) / 100) /* first digit of reply code */
|
||||
#define REPLYCLASS(r) (((r) / 10) % 10) /* second digit of reply code */
|
||||
#define REPLYMINOR(r) ((r) % 10) /* last digit of reply code */
|
||||
#define ISSMTPCODE(c) (isascii(c[0]) && isdigit(c[0]) && \
|
||||
isascii(c[1]) && isdigit(c[1]) && \
|
||||
isascii(c[2]) && isdigit(c[2]))
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2004 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 2000-2004, 2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
@ -44,9 +44,13 @@
|
||||
#include <sendmail.h>
|
||||
#if DNSMAP
|
||||
# if NAMED_BIND
|
||||
# if NETINET
|
||||
# include <netinet/in_systm.h>
|
||||
# include <netinet/ip.h>
|
||||
# endif /* NETINET */
|
||||
# include "sm_resolve.h"
|
||||
|
||||
SM_RCSID("$Id: sm_resolve.c,v 8.36 2008/02/11 23:04:16 ca Exp $")
|
||||
SM_RCSID("$Id: sm_resolve.c,v 8.39 2010/06/29 15:35:33 ca Exp $")
|
||||
|
||||
static struct stot
|
||||
{
|
||||
@ -394,7 +398,13 @@ dns_lookup_int(domain, rr_class, rr_type, retrans, retry)
|
||||
time_t save_retrans = 0;
|
||||
int save_retry = 0;
|
||||
DNS_REPLY_T *r = NULL;
|
||||
unsigned char reply[1024];
|
||||
querybuf reply_buf;
|
||||
unsigned char *reply;
|
||||
|
||||
#define SMRBSIZE sizeof(reply_buf)
|
||||
#ifndef IP_MAXPACKET
|
||||
# define IP_MAXPACKET 65535
|
||||
#endif
|
||||
|
||||
if (tTd(8, 16))
|
||||
{
|
||||
@ -415,15 +425,44 @@ dns_lookup_int(domain, rr_class, rr_type, retrans, retry)
|
||||
}
|
||||
errno = 0;
|
||||
SM_SET_H_ERRNO(0);
|
||||
len = res_search(domain, rr_class, rr_type, reply, sizeof(reply));
|
||||
reply = (unsigned char *)&reply_buf;
|
||||
len = res_search(domain, rr_class, rr_type, reply, SMRBSIZE);
|
||||
if (len >= SMRBSIZE)
|
||||
{
|
||||
if (len >= IP_MAXPACKET)
|
||||
{
|
||||
if (tTd(8, 4))
|
||||
sm_dprintf("dns_lookup: domain=%s, length=%d, default_size=%d, max=%d, status=response too long\n",
|
||||
domain, len, (int) SMRBSIZE,
|
||||
IP_MAXPACKET);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tTd(8, 6))
|
||||
sm_dprintf("dns_lookup: domain=%s, length=%d, default_size=%d, max=%d, status=response longer than default size, resizing\n",
|
||||
domain, len, (int) SMRBSIZE,
|
||||
IP_MAXPACKET);
|
||||
reply = (unsigned char *)sm_malloc(IP_MAXPACKET);
|
||||
if (reply == NULL)
|
||||
SM_SET_H_ERRNO(TRY_AGAIN);
|
||||
else
|
||||
len = res_search(domain, rr_class, rr_type,
|
||||
reply, IP_MAXPACKET);
|
||||
}
|
||||
}
|
||||
if (tTd(8, 16))
|
||||
{
|
||||
_res.options = old_options;
|
||||
sm_dprintf("dns_lookup(%s, %d, %s) --> %d\n",
|
||||
domain, rr_class, dns_type_to_string(rr_type), len);
|
||||
}
|
||||
if (len >= 0)
|
||||
if (len >= 0 && len < IP_MAXPACKET && reply != NULL)
|
||||
r = parse_dns_reply(reply, len);
|
||||
if (reply != (unsigned char *)&reply_buf && reply != NULL)
|
||||
{
|
||||
sm_free(reply);
|
||||
reply = NULL;
|
||||
}
|
||||
if (retrans > 0)
|
||||
_res.retrans = save_retrans;
|
||||
if (retry > 0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -17,7 +17,7 @@
|
||||
# include <libmilter/mfdef.h>
|
||||
#endif /* MILTER */
|
||||
|
||||
SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.989 2009/12/18 17:08:01 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.1008 2011/01/12 23:52:59 ca Exp $")
|
||||
|
||||
#include <sm/time.h>
|
||||
#include <sm/fdset.h>
|
||||
@ -875,10 +875,8 @@ smtp(nullserver, d_flags, e)
|
||||
|
||||
/* XXX should these be options settable via .cf ? */
|
||||
/* ssp.min_ssf = 0; is default due to memset() */
|
||||
{
|
||||
ssp.max_ssf = MaxSLBits;
|
||||
ssp.maxbufsize = MAXOUTLEN;
|
||||
}
|
||||
ssp.max_ssf = MaxSLBits;
|
||||
ssp.maxbufsize = MAXOUTLEN;
|
||||
ssp.security_flags = SASLOpts & SASL_SEC_MASK;
|
||||
sasl_ok = sasl_setprop(conn, SASL_SEC_PROPS, &ssp) == SASL_OK;
|
||||
|
||||
@ -909,15 +907,6 @@ smtp(nullserver, d_flags, e)
|
||||
#endif /* SASL */
|
||||
|
||||
#if STARTTLS
|
||||
# if USE_OPENSSL_ENGINE
|
||||
if (tls_ok_srv && bitset(SRV_OFFER_TLS, features) &&
|
||||
!SSL_set_engine(NULL))
|
||||
{
|
||||
sm_syslog(LOG_ERR, NOQID,
|
||||
"STARTTLS=server, SSL_set_engine=failed");
|
||||
tls_ok_srv = false;
|
||||
}
|
||||
# endif /* USE_OPENSSL_ENGINE */
|
||||
|
||||
|
||||
set_tls_rd_tmo(TimeOuts.to_nextcommand);
|
||||
@ -1836,6 +1825,21 @@ smtp(nullserver, d_flags, e)
|
||||
break;
|
||||
}
|
||||
starttls:
|
||||
# if USE_OPENSSL_ENGINE
|
||||
if (!SSLEngineInitialized)
|
||||
{
|
||||
if (!SSL_set_engine(NULL))
|
||||
{
|
||||
sm_syslog(LOG_ERR, NOQID,
|
||||
"STARTTLS=server, SSL_set_engine=failed");
|
||||
tls_ok_srv = false;
|
||||
message("454 4.3.3 TLS not available right now");
|
||||
break;
|
||||
}
|
||||
else
|
||||
SSLEngineInitialized = true;
|
||||
}
|
||||
# endif /* USE_OPENSSL_ENGINE */
|
||||
# if TLS_NO_RSA
|
||||
/*
|
||||
** XXX do we need a temp key ?
|
||||
@ -2260,8 +2264,7 @@ smtp(nullserver, d_flags, e)
|
||||
message("250-AUTH %s", mechlist);
|
||||
#endif /* SASL */
|
||||
#if STARTTLS
|
||||
if (tls_ok_srv &&
|
||||
bitset(SRV_OFFER_TLS, features))
|
||||
if (tls_ok_srv && bitset(SRV_OFFER_TLS, features))
|
||||
message("250-STARTTLS");
|
||||
#endif /* STARTTLS */
|
||||
if (DeliverByMin > 0)
|
||||
@ -2622,7 +2625,7 @@ smtp(nullserver, d_flags, e)
|
||||
goto rcpt_done;
|
||||
}
|
||||
|
||||
if (e->e_sendmode != SM_DELIVER
|
||||
if (!SM_IS_INTERACTIVE(e->e_sendmode)
|
||||
#if _FFR_DM_ONE
|
||||
&& (NotFirstDelivery || SM_DM_ONE != e->e_sendmode)
|
||||
#endif /* _FFR_DM_ONE */
|
||||
@ -3724,6 +3727,7 @@ smtp_data(smtp, e)
|
||||
_res.retrans = TimeOuts.res_retrans[RES_TO_FIRST];
|
||||
#endif /* NAMED_BIND */
|
||||
|
||||
|
||||
for (ee = e; ee != NULL; ee = ee->e_sibling)
|
||||
{
|
||||
/* make sure we actually do delivery */
|
||||
@ -3767,18 +3771,18 @@ smtp_data(smtp, e)
|
||||
oldid = CurEnv->e_id;
|
||||
CurEnv->e_id = id;
|
||||
|
||||
/* issue success message */
|
||||
/* issue success message */
|
||||
#if _FFR_MSG_ACCEPT
|
||||
if (MessageAccept != NULL && *MessageAccept != '\0')
|
||||
{
|
||||
char msg[MAXLINE];
|
||||
if (MessageAccept != NULL && *MessageAccept != '\0')
|
||||
{
|
||||
char msg[MAXLINE];
|
||||
|
||||
expand(MessageAccept, msg, sizeof(msg), e);
|
||||
message("250 2.0.0 %s", msg);
|
||||
}
|
||||
else
|
||||
expand(MessageAccept, msg, sizeof(msg), e);
|
||||
message("250 2.0.0 %s", msg);
|
||||
}
|
||||
else
|
||||
#endif /* _FFR_MSG_ACCEPT */
|
||||
message("250 2.0.0 %s Message accepted for delivery", id);
|
||||
message("250 2.0.0 %s Message accepted for delivery", id);
|
||||
CurEnv->e_id = oldid;
|
||||
|
||||
/* if we just queued, poke it */
|
||||
@ -4687,7 +4691,8 @@ proxy_policy(conn, context, requested_user, rlen, auth_identity, alen,
|
||||
return SASL_FAIL;
|
||||
|
||||
macdefine(&BlankEnvelope.e_macro, A_TEMP,
|
||||
macid("{auth_authen}"), (char *) auth_identity);
|
||||
macid("{auth_authen}"),
|
||||
xtextify((char *) auth_identity, "=<>\")"));
|
||||
|
||||
return SASL_OK;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2006, 2008, 2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 2000-2006, 2008, 2009, 2011 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#include <sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: tls.c,v 8.114 2009/08/10 15:11:09 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: tls.c,v 8.118 2011/03/07 23:20:47 ca Exp $")
|
||||
|
||||
#if STARTTLS
|
||||
# include <openssl/err.h>
|
||||
@ -1168,7 +1168,7 @@ tls_get_info(ssl, srv, host, mac, certreq)
|
||||
MACROS_T *mac;
|
||||
bool certreq;
|
||||
{
|
||||
SSL_CIPHER *c;
|
||||
const SSL_CIPHER *c;
|
||||
int b, r;
|
||||
long verifyok;
|
||||
char *s, *who;
|
||||
@ -1213,12 +1213,14 @@ tls_get_info(ssl, srv, host, mac, certreq)
|
||||
macdefine(mac, A_TEMP, macid("{cert_issuer}"),
|
||||
xtextify(buf, "<>\")"));
|
||||
|
||||
# define LL_BADCERT 8
|
||||
|
||||
#define CHECK_X509_NAME(which) \
|
||||
do { \
|
||||
if (r == -1) \
|
||||
{ \
|
||||
sm_strlcpy(buf, "BadCertificateUnknown", sizeof(buf)); \
|
||||
if (LogLevel > 7) \
|
||||
if (LogLevel > LL_BADCERT) \
|
||||
sm_syslog(LOG_INFO, NOQID, \
|
||||
"STARTTLS=%s, relay=%.100s, field=%s, status=failed to extract CN", \
|
||||
who, \
|
||||
|
@ -15,9 +15,9 @@
|
||||
#include "map.h"
|
||||
|
||||
#if USERDB
|
||||
SM_RCSID("@(#)$Id: udb.c,v 8.164 2006/12/19 19:49:51 ca Exp $ (with USERDB)")
|
||||
SM_RCSID("@(#)$Id: udb.c,v 8.165 2010/01/10 06:22:00 ca Exp $ (with USERDB)")
|
||||
#else /* USERDB */
|
||||
SM_RCSID("@(#)$Id: udb.c,v 8.164 2006/12/19 19:49:51 ca Exp $ (without USERDB)")
|
||||
SM_RCSID("@(#)$Id: udb.c,v 8.165 2010/01/10 06:22:00 ca Exp $ (without USERDB)")
|
||||
#endif /* USERDB */
|
||||
|
||||
#if USERDB
|
||||
@ -1219,7 +1219,7 @@ _udbx_close()
|
||||
# endif /* DB_VERSION_MAJOR < 2 */
|
||||
}
|
||||
if (tTd(28, 1))
|
||||
sm_dprintf("_udbx_init: db->close(%s)\n",
|
||||
sm_dprintf("_udbx_close: db->close(%s)\n",
|
||||
up->udb_dbname);
|
||||
# endif /* NEWDB */
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2006, 2008, 2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2006, 2008-2010 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
#include <sendmail.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: usersmtp.c,v 8.473 2009/06/17 17:26:51 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: usersmtp.c,v 8.485 2010/07/23 21:09:38 ca Exp $")
|
||||
|
||||
#include <sysexits.h>
|
||||
|
||||
@ -33,7 +33,6 @@ extern void sm_sasl_free __P((void *));
|
||||
** This protocol is described in RFC821.
|
||||
*/
|
||||
|
||||
#define REPLYCLASS(r) (((r) / 10) % 10) /* second digit of reply code */
|
||||
#define SMTPCLOSING 421 /* "Service Shutting Down" */
|
||||
|
||||
#define ENHSCN(e, d) ((e) == NULL ? (d) : (e))
|
||||
@ -136,8 +135,7 @@ smtpinit(m, mci, e, onlyhelo)
|
||||
SmtpPhase = mci->mci_phase = "client greeting";
|
||||
sm_setproctitle(true, e, "%s %s: %s",
|
||||
qid_printname(e), CurHostName, mci->mci_phase);
|
||||
r = reply(m, mci, e, TimeOuts.to_initial, esmtp_check, NULL,
|
||||
XS_DEFAULT);
|
||||
r = reply(m, mci, e, TimeOuts.to_initial, esmtp_check, NULL, XS_GREET);
|
||||
if (r < 0)
|
||||
goto tempfail1;
|
||||
if (REPLYTYPE(r) == 4)
|
||||
@ -183,7 +181,7 @@ smtpinit(m, mci, e, onlyhelo)
|
||||
r = reply(m, mci, e,
|
||||
bitnset(M_LMTP, m->m_flags) ? TimeOuts.to_lhlo
|
||||
: TimeOuts.to_helo,
|
||||
helo_options, NULL, XS_DEFAULT);
|
||||
helo_options, NULL, XS_EHLO);
|
||||
if (r < 0)
|
||||
goto tempfail1;
|
||||
else if (REPLYTYPE(r) == 5)
|
||||
@ -336,7 +334,15 @@ str_union(s1, s2, rpool)
|
||||
l1 = strlen(s1);
|
||||
l2 = strlen(s2);
|
||||
rl = l1 + l2;
|
||||
res = (char *) sm_rpool_malloc(rpool, rl + 2);
|
||||
if (rl <= 0)
|
||||
{
|
||||
sm_syslog(LOG_WARNING, NOQID,
|
||||
"str_union: stringlen1=%d, stringlen2=%d, sum=%d, status=overflow",
|
||||
l1, l2, rl);
|
||||
res = NULL;
|
||||
}
|
||||
else
|
||||
res = (char *) sm_rpool_malloc(rpool, rl + 2);
|
||||
if (res == NULL)
|
||||
{
|
||||
if (l1 > l2)
|
||||
@ -409,9 +415,7 @@ helo_options(line, firstline, m, mci, e)
|
||||
|
||||
if (firstline)
|
||||
{
|
||||
#if SASL
|
||||
mci->mci_saslcap = NULL;
|
||||
#endif /* SASL */
|
||||
mci_clr_extensions(mci);
|
||||
#if _FFR_IGNORE_EXT_ON_HELO
|
||||
logged = false;
|
||||
#endif /* _FFR_IGNORE_EXT_ON_HELO */
|
||||
@ -472,7 +476,8 @@ helo_options(line, firstline, m, mci, e)
|
||||
#if SASL
|
||||
else if (sm_strcasecmp(line, "auth") == 0)
|
||||
{
|
||||
if (p != NULL && *p != '\0')
|
||||
if (p != NULL && *p != '\0' &&
|
||||
!bitset(MCIF_AUTH2, mci->mci_flags))
|
||||
{
|
||||
if (mci->mci_saslcap != NULL)
|
||||
{
|
||||
@ -484,7 +489,7 @@ helo_options(line, firstline, m, mci, e)
|
||||
|
||||
mci->mci_saslcap = str_union(mci->mci_saslcap,
|
||||
p, mci->mci_rpool);
|
||||
mci->mci_flags |= MCIF_AUTH;
|
||||
mci->mci_flags |= MCIF_AUTH2;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -501,6 +506,9 @@ helo_options(line, firstline, m, mci, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tTd(95, 5))
|
||||
sm_syslog(LOG_DEBUG, NOQID, "AUTH flags=%lx, mechs=%s",
|
||||
mci->mci_flags, mci->mci_saslcap);
|
||||
}
|
||||
#endif /* SASL */
|
||||
}
|
||||
@ -1606,13 +1614,11 @@ attemptauth(m, mci, e, sai)
|
||||
(void) memset(&ssp, '\0', sizeof(ssp));
|
||||
|
||||
/* XXX should these be options settable via .cf ? */
|
||||
{
|
||||
ssp.max_ssf = MaxSLBits;
|
||||
ssp.maxbufsize = MAXOUTLEN;
|
||||
ssp.max_ssf = MaxSLBits;
|
||||
ssp.maxbufsize = MAXOUTLEN;
|
||||
# if 0
|
||||
ssp.security_flags = SASL_SEC_NOPLAINTEXT;
|
||||
ssp.security_flags = SASL_SEC_NOPLAINTEXT;
|
||||
# endif /* 0 */
|
||||
}
|
||||
saslresult = sasl_setprop(mci->mci_conn, SASL_SEC_PROPS, &ssp);
|
||||
if (saslresult != SASL_OK)
|
||||
return EX_TEMPFAIL;
|
||||
@ -2175,7 +2181,7 @@ smtpmailfrom(m, mci, e)
|
||||
SmtpPhase = mci->mci_phase = "client MAIL";
|
||||
sm_setproctitle(true, e, "%s %s: %s", qid_printname(e),
|
||||
CurHostName, mci->mci_phase);
|
||||
r = reply(m, mci, e, TimeOuts.to_mail, NULL, &enhsc, XS_DEFAULT);
|
||||
r = reply(m, mci, e, TimeOuts.to_mail, NULL, &enhsc, XS_MAIL);
|
||||
if (r < 0)
|
||||
{
|
||||
/* communications failure */
|
||||
@ -2427,7 +2433,7 @@ smtprcptstat(to, m, mci, e)
|
||||
}
|
||||
|
||||
enhsc = NULL;
|
||||
r = reply(m, mci, e, TimeOuts.to_rcpt, NULL, &enhsc, XS_DEFAULT);
|
||||
r = reply(m, mci, e, TimeOuts.to_rcpt, NULL, &enhsc, XS_RCPT);
|
||||
save_errno = errno;
|
||||
to->q_rstatus = sm_rpool_strdup_x(e->e_rpool, SmtpReplyBuffer);
|
||||
to->q_status = ENHSCN_RPOOL(enhsc, smtptodsn(r), e->e_rpool);
|
||||
@ -2588,7 +2594,7 @@ smtpdata(m, mci, e, ctladdr, xstart)
|
||||
mci->mci_state = MCIS_DATA;
|
||||
sm_setproctitle(true, e, "%s %s: %s",
|
||||
qid_printname(e), CurHostName, mci->mci_phase);
|
||||
r = reply(m, mci, e, TimeOuts.to_datainit, NULL, &enhsc, XS_DEFAULT);
|
||||
r = reply(m, mci, e, TimeOuts.to_datainit, NULL, &enhsc, XS_DATA);
|
||||
if (r < 0 || REPLYTYPE(r) == 4)
|
||||
{
|
||||
if (r >= 0)
|
||||
@ -2722,7 +2728,7 @@ smtpdata(m, mci, e, ctladdr, xstart)
|
||||
CurHostName, mci->mci_phase);
|
||||
if (bitnset(M_LMTP, m->m_flags))
|
||||
return EX_OK;
|
||||
r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_DEFAULT);
|
||||
r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_EOM);
|
||||
if (r < 0)
|
||||
return EX_TEMPFAIL;
|
||||
if (mci->mci_state == MCIS_DATA)
|
||||
@ -2807,7 +2813,7 @@ smtpgetstat(m, mci, e)
|
||||
enhsc = NULL;
|
||||
|
||||
/* check for the results of the transaction */
|
||||
r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_DEFAULT);
|
||||
r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc, XS_DATA2);
|
||||
if (r < 0)
|
||||
return EX_TEMPFAIL;
|
||||
xstat = EX_NOTSTICKY;
|
||||
@ -2893,8 +2899,7 @@ smtpquit(m, mci, e)
|
||||
SmtpPhase = "client QUIT";
|
||||
mci->mci_state = MCIS_QUITING;
|
||||
smtpmessage("QUIT", m, mci);
|
||||
(void) reply(m, mci, e, TimeOuts.to_quit, NULL, NULL,
|
||||
XS_DEFAULT);
|
||||
(void) reply(m, mci, e, TimeOuts.to_quit, NULL, NULL, XS_QUIT);
|
||||
SuprErrs = oldSuprErrs;
|
||||
if (mci->mci_state == MCIS_CLOSED)
|
||||
goto end;
|
||||
@ -3233,14 +3238,17 @@ reply(m, mci, e, timeout, pfunc, enhstat, rtype)
|
||||
if (pfunc != NULL)
|
||||
(*pfunc)(bufp, firstline, m, mci, e);
|
||||
|
||||
firstline = false;
|
||||
|
||||
/* decode the reply code */
|
||||
r = atoi(bufp);
|
||||
|
||||
/* extra semantics: 0xx codes are "informational" */
|
||||
if (r < 100)
|
||||
{
|
||||
firstline = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
firstline = false;
|
||||
|
||||
/* if no continuation lines, return this line */
|
||||
if (bufp[3] != '-')
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2009 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@ -13,6 +13,6 @@
|
||||
|
||||
#include <sm/gen.h>
|
||||
|
||||
SM_RCSID("@(#)$Id: version.c,v 8.218 2009/12/23 04:43:09 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: version.c,v 8.227 2011/04/26 23:02:35 ca Exp $")
|
||||
|
||||
char Version[] = "8.14.4";
|
||||
char Version[] = "8.14.5";
|
||||
|
@ -46,7 +46,7 @@ case "$daily_scrub_zfs_enable" in
|
||||
esac
|
||||
|
||||
# determine how many days shall be between scrubs
|
||||
eval _pool_threshold=\${daily_scrub_zfs_${pool}_threshold}
|
||||
eval _pool_threshold=\${daily_scrub_zfs_$(echo "${pool}"|tr -s "-" "_"|tr -s "." "_"|tr -s ":" "_")_threshold}
|
||||
if [ -z "${_pool_threshold}" ];then
|
||||
_pool_threshold=${daily_scrub_zfs_default_threshold}
|
||||
fi
|
||||
|
@ -66,12 +66,10 @@ dnl so this file will not serve as a database of the available servers.
|
||||
dnl For that, visit
|
||||
dnl http://www.google.com/Top/Computers/Internet/E-mail/Spam/Blacklists/
|
||||
|
||||
dnl Uncomment to activate Realtime Blackhole List
|
||||
dnl information available at http://www.mail-abuse.com/
|
||||
dnl NOTE: This is a subscription service as of July 31, 2001
|
||||
dnl FEATURE(dnsbl)
|
||||
dnl Uncomment to activate your chosen DNS based blacklist
|
||||
dnl FEATURE(dnsbl, `dnsbl.example.com')
|
||||
dnl Alternatively, you can provide your own server and rejection message:
|
||||
dnl FEATURE(dnsbl, `blackholes.mail-abuse.org', ``"550 Mail from " $&{client_addr} " rejected, see http://mail-abuse.org/cgi-bin/lookup?" $&{client_addr}'')
|
||||
dnl FEATURE(dnsbl, `dnsbl.example.com', ``"550 Mail from " $&{client_addr} " rejected'')
|
||||
|
||||
dnl Dialup users should uncomment and define this appropriately
|
||||
dnl define(`SMART_HOST', `your.isp.mail.server')
|
||||
|
@ -25,4 +25,3 @@ define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl
|
||||
dnl
|
||||
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
|
||||
FEATURE(`msp', `[127.0.0.1]')dnl
|
||||
|
||||
|
@ -480,7 +480,7 @@
|
||||
Figwort release to the Hydrangea release.</para>
|
||||
|
||||
<para role="merged"><application>sendmail</application> has been updated from
|
||||
8.14.1 to 8.14.4.</para>
|
||||
8.14.1 to 8.14.5.</para>
|
||||
|
||||
<para role="merged">The timezone database has been updated from
|
||||
the <application>tzdata2008h</application> release to
|
||||
|
@ -5044,13 +5044,13 @@ getdevid(struct cam_devitem *item)
|
||||
* then allocate that much memory and try again.
|
||||
*/
|
||||
retry:
|
||||
ccb->ccb_h.func_code = XPT_GDEV_ADVINFO;
|
||||
ccb->ccb_h.func_code = XPT_DEV_ADVINFO;
|
||||
ccb->ccb_h.flags = CAM_DIR_IN;
|
||||
ccb->cgdai.flags = CGDAI_FLAG_PROTO;
|
||||
ccb->cgdai.buftype = CGDAI_TYPE_SCSI_DEVID;
|
||||
ccb->cgdai.bufsiz = item->device_id_len;
|
||||
ccb->cdai.flags = 0;
|
||||
ccb->cdai.buftype = CDAI_TYPE_SCSI_DEVID;
|
||||
ccb->cdai.bufsiz = item->device_id_len;
|
||||
if (item->device_id_len != 0)
|
||||
ccb->cgdai.buf = (uint8_t *)item->device_id;
|
||||
ccb->cdai.buf = (uint8_t *)item->device_id;
|
||||
|
||||
if (cam_send_ccb(dev, ccb) < 0) {
|
||||
warn("%s: error sending XPT_GDEV_ADVINFO CCB", __func__);
|
||||
@ -5069,13 +5069,13 @@ getdevid(struct cam_devitem *item)
|
||||
* This is our first time through. Allocate the buffer,
|
||||
* and then go back to get the data.
|
||||
*/
|
||||
if (ccb->cgdai.provsiz == 0) {
|
||||
if (ccb->cdai.provsiz == 0) {
|
||||
warnx("%s: invalid .provsiz field returned with "
|
||||
"XPT_GDEV_ADVINFO CCB", __func__);
|
||||
retval = 1;
|
||||
goto bailout;
|
||||
}
|
||||
item->device_id_len = ccb->cgdai.provsiz;
|
||||
item->device_id_len = ccb->cdai.provsiz;
|
||||
item->device_id = malloc(item->device_id_len);
|
||||
if (item->device_id == NULL) {
|
||||
warn("%s: unable to allocate %d bytes", __func__,
|
||||
@ -5283,8 +5283,9 @@ findsasdevice(struct cam_devlist *devlist, uint64_t sasaddr)
|
||||
/*
|
||||
* XXX KDM look for LUN IDs as well?
|
||||
*/
|
||||
item_addr = scsi_get_sas_addr(item->device_id,
|
||||
item->device_id_len);
|
||||
item_addr = scsi_get_devid(item->device_id,
|
||||
item->device_id_len,
|
||||
scsi_devid_is_sas_target);
|
||||
if (item_addr == NULL)
|
||||
continue;
|
||||
|
||||
|
@ -908,7 +908,7 @@ unsetifdescr(const char *val, int value, int s, const struct afswtch *afp)
|
||||
#define IFCAPBITS \
|
||||
"\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \
|
||||
"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \
|
||||
"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE"
|
||||
"\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP"
|
||||
|
||||
/*
|
||||
* Print the status of the interface. If an address family was
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd May 30, 2011
|
||||
.Dd June 14, 2011
|
||||
.Dt IPFW 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -2435,6 +2435,27 @@ Reset table of the packet aliasing engine on address change.
|
||||
Reverse the way libalias handles aliasing.
|
||||
.It Cm proxy_only
|
||||
Obey transparent proxy rules only, packet aliasing is not performed.
|
||||
.It Cm skip_global
|
||||
Skip instance in case of global state lookup (see below).
|
||||
.El
|
||||
.Pp
|
||||
Some specials value can be supplied instead of
|
||||
.Va nat_number:
|
||||
.Bl -tag -width indent
|
||||
.It Cm global
|
||||
Looks up translation state in all configured nat instances.
|
||||
If an entry is found, packet is aliased according to that entry.
|
||||
If no entry was found in any of the instances, packet is passed unchanged,
|
||||
and no new entry will be created.
|
||||
See section
|
||||
.Sx MULTIPLE INSTANCES
|
||||
in
|
||||
.Xr natd 8
|
||||
for more information.
|
||||
.It Cm tablearg
|
||||
Uses argument supplied in lookup table. See
|
||||
.Sx LOOKUP TABLES
|
||||
section below for more information on lookup tables.
|
||||
.El
|
||||
.Pp
|
||||
To let the packet continue after being (de)aliased, set the sysctl variable
|
||||
|
@ -1121,8 +1121,11 @@ show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth)
|
||||
break;
|
||||
|
||||
case O_NAT:
|
||||
PRINT_UINT_ARG("nat ", cmd->arg1);
|
||||
break;
|
||||
if (cmd->arg1 != 0)
|
||||
PRINT_UINT_ARG("nat ", cmd->arg1);
|
||||
else
|
||||
printf("nat global");
|
||||
break;
|
||||
|
||||
case O_SETFIB:
|
||||
PRINT_UINT_ARG("setfib ", cmd->arg1);
|
||||
@ -2738,9 +2741,14 @@ ipfw_add(char *av[])
|
||||
break;
|
||||
|
||||
case TOK_NAT:
|
||||
action->opcode = O_NAT;
|
||||
action->len = F_INSN_SIZE(ipfw_insn_nat);
|
||||
goto chkarg;
|
||||
action->opcode = O_NAT;
|
||||
action->len = F_INSN_SIZE(ipfw_insn_nat);
|
||||
if (_substrcmp(*av, "global") == 0) {
|
||||
action->arg1 = 0;
|
||||
av++;
|
||||
break;
|
||||
} else
|
||||
goto chkarg;
|
||||
|
||||
case TOK_QUEUE:
|
||||
action->opcode = O_QUEUE;
|
||||
|
@ -178,6 +178,7 @@ enum tokens {
|
||||
TOK_DENY_INC,
|
||||
TOK_SAME_PORTS,
|
||||
TOK_UNREG_ONLY,
|
||||
TOK_SKIP_GLOBAL,
|
||||
TOK_RESET_ADDR,
|
||||
TOK_ALIAS_REV,
|
||||
TOK_PROXY_ONLY,
|
||||
|
@ -53,6 +53,7 @@ static struct _s_x nat_params[] = {
|
||||
{ "deny_in", TOK_DENY_INC },
|
||||
{ "same_ports", TOK_SAME_PORTS },
|
||||
{ "unreg_only", TOK_UNREG_ONLY },
|
||||
{ "skip_global", TOK_SKIP_GLOBAL },
|
||||
{ "reset", TOK_RESET_ADDR },
|
||||
{ "reverse", TOK_ALIAS_REV },
|
||||
{ "proxy_only", TOK_PROXY_ONLY },
|
||||
@ -628,6 +629,9 @@ print_nat_config(unsigned char *buf)
|
||||
} else if (n->mode & PKT_ALIAS_SAME_PORTS) {
|
||||
printf(" same_ports");
|
||||
n->mode &= ~PKT_ALIAS_SAME_PORTS;
|
||||
} else if (n->mode & PKT_ALIAS_SKIP_GLOBAL) {
|
||||
printf(" skip_global");
|
||||
n->mode &= ~PKT_ALIAS_SKIP_GLOBAL;
|
||||
} else if (n->mode & PKT_ALIAS_UNREGISTERED_ONLY) {
|
||||
printf(" unreg_only");
|
||||
n->mode &= ~PKT_ALIAS_UNREGISTERED_ONLY;
|
||||
@ -721,16 +725,18 @@ ipfw_config_nat(int ac, char **av)
|
||||
{
|
||||
struct cfg_nat *n; /* Nat instance configuration. */
|
||||
int i, off, tok, ac1;
|
||||
char *id, *buf, **av1;
|
||||
char *id, *buf, **av1, *end;
|
||||
size_t len;
|
||||
|
||||
av++; ac--;
|
||||
/* Nat id. */
|
||||
if (ac && isdigit(**av)) {
|
||||
id = *av;
|
||||
ac--; av++;
|
||||
} else
|
||||
if (ac == 0)
|
||||
errx(EX_DATAERR, "missing nat id");
|
||||
id = *av;
|
||||
i = (int)strtol(id, &end, 0);
|
||||
if (i <= 0 || *end != '\0')
|
||||
errx(EX_DATAERR, "illegal nat id: %s", id);
|
||||
av++; ac--;
|
||||
if (ac == 0)
|
||||
errx(EX_DATAERR, "missing option");
|
||||
|
||||
@ -744,10 +750,11 @@ ipfw_config_nat(int ac, char **av)
|
||||
case TOK_IP:
|
||||
case TOK_IF:
|
||||
ac1--; av1++;
|
||||
break;
|
||||
break;
|
||||
case TOK_ALOG:
|
||||
case TOK_DENY_INC:
|
||||
case TOK_SAME_PORTS:
|
||||
case TOK_SKIP_GLOBAL:
|
||||
case TOK_UNREG_ONLY:
|
||||
case TOK_RESET_ADDR:
|
||||
case TOK_ALIAS_REV:
|
||||
@ -787,7 +794,6 @@ ipfw_config_nat(int ac, char **av)
|
||||
off = sizeof(*n);
|
||||
memset(buf, 0, len);
|
||||
n = (struct cfg_nat *)buf;
|
||||
i = atoi(id);
|
||||
n->id = i;
|
||||
|
||||
while (ac > 0) {
|
||||
@ -820,6 +826,9 @@ ipfw_config_nat(int ac, char **av)
|
||||
case TOK_UNREG_ONLY:
|
||||
n->mode |= PKT_ALIAS_UNREGISTERED_ONLY;
|
||||
break;
|
||||
case TOK_SKIP_GLOBAL:
|
||||
n->mode |= PKT_ALIAS_SKIP_GLOBAL;
|
||||
break;
|
||||
case TOK_RESET_ADDR:
|
||||
n->mode |= PKT_ALIAS_RESET_ON_ADDR_CHANGE;
|
||||
break;
|
||||
|
@ -166,6 +166,7 @@ skreuzer [label="Steven Kreuzer\nskreuzer@FreeBSD.org\n2009/03/25"]
|
||||
sobomax[label="Maxim Sobolev\nsobomax@FreeBSD.org\n2000/05/17"]
|
||||
stas [label="Stanislav Sedov\nstas@FreeBSD.org\n2006/09/18"]
|
||||
stefan [label="Stefan Walter\nstefan@FreeBSD.org\n2006/05/07"]
|
||||
stephen [label="Stephen Montgomery-Smith\nstephen@FreeBSD.org\n2011/06/13"]
|
||||
sunpoet [label="Po-Chuan Hsieh\nsunpoet@FreeBSD.org\n2010/09/21"]
|
||||
sylvio [label="Sylvio Cesar Teixeira\nsylvio@FreeBSD.org\n2009/10/29"]
|
||||
swills [label="Steve Wills\nswills@FreeBSD.org\n2010/09/03"]
|
||||
@ -259,6 +260,7 @@ flz -> romain
|
||||
|
||||
gabor -> lippe
|
||||
gabor -> pgj
|
||||
gabor -> stephen
|
||||
|
||||
garga -> acm
|
||||
garga -> alepulver
|
||||
@ -311,6 +313,7 @@ lioux -> pat
|
||||
|
||||
lwhsu -> yzlin
|
||||
|
||||
maho -> stephen
|
||||
maho -> tota
|
||||
|
||||
marcus -> ahze
|
||||
|
@ -295,6 +295,7 @@ options USB_DEBUG # enable debug msgs
|
||||
device uhci # UHCI PCI->USB interface
|
||||
device ohci # OHCI PCI->USB interface
|
||||
device ehci # EHCI PCI->USB interface (USB 2.0)
|
||||
device xhci # XHCI PCI->USB interface (USB 3.0)
|
||||
device usb # USB Bus (required)
|
||||
#device udbp # USB Double Bulk Pipe devices (needs netgraph)
|
||||
device uhid # "Human Interface Devices"
|
||||
|
@ -812,6 +812,25 @@ adasysctlinit(void *context, int pending)
|
||||
cam_periph_release(periph);
|
||||
}
|
||||
|
||||
static int
|
||||
adagetattr(struct bio *bp)
|
||||
{
|
||||
int ret = -1;
|
||||
struct cam_periph *periph;
|
||||
|
||||
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1)
|
||||
return ENXIO;
|
||||
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
|
||||
if (periph->path == NULL)
|
||||
return ENXIO;
|
||||
|
||||
ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute,
|
||||
periph->path);
|
||||
if (ret == 0)
|
||||
bp->bio_completed = bp->bio_length;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static cam_status
|
||||
adaregister(struct cam_periph *periph, void *arg)
|
||||
{
|
||||
@ -917,6 +936,7 @@ adaregister(struct cam_periph *periph, void *arg)
|
||||
softc->disk->d_open = adaopen;
|
||||
softc->disk->d_close = adaclose;
|
||||
softc->disk->d_strategy = adastrategy;
|
||||
softc->disk->d_getattr = adagetattr;
|
||||
softc->disk->d_dump = adadump;
|
||||
softc->disk->d_name = "ada";
|
||||
softc->disk->d_drv1 = periph;
|
||||
@ -938,8 +958,6 @@ adaregister(struct cam_periph *periph, void *arg)
|
||||
((softc->flags & ADA_FLAG_CAN_CFA) &&
|
||||
!(softc->flags & ADA_FLAG_CAN_48BIT)))
|
||||
softc->disk->d_flags |= DISKFLAG_CANDELETE;
|
||||
strlcpy(softc->disk->d_ident, cgd->serial_num,
|
||||
MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1));
|
||||
strlcpy(softc->disk->d_descr, cgd->ident_data.model,
|
||||
MIN(sizeof(softc->disk->d_descr), sizeof(cgd->ident_data.model)));
|
||||
softc->disk->d_hba_vendor = cpi.hba_vendor;
|
||||
|
@ -144,8 +144,8 @@ typedef enum {
|
||||
/* Device statistics (error counts, etc.) */
|
||||
XPT_FREEZE_QUEUE = 0x0d,
|
||||
/* Freeze device queue */
|
||||
XPT_GDEV_ADVINFO = 0x0e,
|
||||
/* Advanced device information */
|
||||
XPT_DEV_ADVINFO = 0x0e,
|
||||
/* Get/Set Device advanced information */
|
||||
/* SCSI Control Functions: 0x10->0x1F */
|
||||
XPT_ABORT = 0x10,
|
||||
/* Abort the specified CCB */
|
||||
@ -391,15 +391,24 @@ typedef enum {
|
||||
DEV_MATCH_TARGET = 0x002,
|
||||
DEV_MATCH_LUN = 0x004,
|
||||
DEV_MATCH_INQUIRY = 0x008,
|
||||
DEV_MATCH_DEVID = 0x010,
|
||||
DEV_MATCH_ANY = 0x00f
|
||||
} dev_pattern_flags;
|
||||
|
||||
struct device_id_match_pattern {
|
||||
uint8_t id_len;
|
||||
uint8_t id[256];
|
||||
};
|
||||
|
||||
struct device_match_pattern {
|
||||
path_id_t path_id;
|
||||
target_id_t target_id;
|
||||
lun_id_t target_lun;
|
||||
struct scsi_static_inquiry_pattern inq_pat;
|
||||
dev_pattern_flags flags;
|
||||
path_id_t path_id;
|
||||
target_id_t target_id;
|
||||
lun_id_t target_lun;
|
||||
dev_pattern_flags flags;
|
||||
union {
|
||||
struct scsi_static_inquiry_pattern inq_pat;
|
||||
struct device_id_match_pattern devid_pat;
|
||||
} data;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@ -745,6 +754,7 @@ struct ccb_relsim {
|
||||
* Definitions for the asynchronous callback CCB fields.
|
||||
*/
|
||||
typedef enum {
|
||||
AC_ADVINFO_CHANGED = 0x2000,/* Advance info might have changes */
|
||||
AC_CONTRACT = 0x1000,/* A contractual callback */
|
||||
AC_GETDEV_CHANGED = 0x800,/* Getdev info might have changed */
|
||||
AC_INQ_CHANGED = 0x400,/* Inquiry info might have changed */
|
||||
@ -1094,19 +1104,20 @@ struct ccb_eng_exec { /* This structure must match SCSIIO size */
|
||||
#define XPT_CCB_INVALID -1 /* for signaling a bad CCB to free */
|
||||
|
||||
/*
|
||||
* CCB for getting advanced device information. This operates in a fashion
|
||||
* CCB for working with advanced device information. This operates in a fashion
|
||||
* similar to XPT_GDEV_TYPE. Specify the target in ccb_h, the buffer
|
||||
* type requested, and provide a buffer size/buffer to write to. If the
|
||||
* buffer is too small, the handler will set GDEVAI_FLAG_MORE.
|
||||
* buffer is too small, provsiz will be larger than bufsiz.
|
||||
*/
|
||||
struct ccb_getdev_advinfo {
|
||||
struct ccb_dev_advinfo {
|
||||
struct ccb_hdr ccb_h;
|
||||
uint32_t flags;
|
||||
#define CGDAI_FLAG_TRANSPORT 0x1
|
||||
#define CGDAI_FLAG_PROTO 0x2
|
||||
#define CDAI_FLAG_STORE 0x1 /* If set, action becomes store */
|
||||
uint32_t buftype; /* IN: Type of data being requested */
|
||||
/* NB: buftype is interpreted on a per-transport basis */
|
||||
#define CGDAI_TYPE_SCSI_DEVID 1
|
||||
#define CDAI_TYPE_SCSI_DEVID 1
|
||||
#define CDAI_TYPE_SERIAL_NUM 2
|
||||
#define CDAI_TYPE_PHYS_PATH 3
|
||||
off_t bufsiz; /* IN: Size of external buffer */
|
||||
#define CAM_SCSI_DEVID_MAXLEN 65536 /* length in buffer is an uint16_t */
|
||||
off_t provsiz; /* OUT: Size required/used */
|
||||
@ -1151,7 +1162,7 @@ union ccb {
|
||||
struct ccb_rescan crcn;
|
||||
struct ccb_debug cdbg;
|
||||
struct ccb_ataio ataio;
|
||||
struct ccb_getdev_advinfo cgdai;
|
||||
struct ccb_dev_advinfo cdai;
|
||||
};
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/proc.h>
|
||||
#include <sys/devicestat.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/sbuf.h>
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
@ -303,6 +304,38 @@ cam_periph_find(struct cam_path *path, char *name)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find a peripheral structure with the specified path, target, lun,
|
||||
* and (optionally) type. If the name is NULL, this function will return
|
||||
* the first peripheral driver that matches the specified path.
|
||||
*/
|
||||
int
|
||||
cam_periph_list(struct cam_path *path, struct sbuf *sb)
|
||||
{
|
||||
struct periph_driver **p_drv;
|
||||
struct cam_periph *periph;
|
||||
int count;
|
||||
|
||||
count = 0;
|
||||
xpt_lock_buses();
|
||||
for (p_drv = periph_drivers; *p_drv != NULL; p_drv++) {
|
||||
|
||||
TAILQ_FOREACH(periph, &(*p_drv)->units, unit_links) {
|
||||
if (xpt_path_comp(periph->path, path) != 0)
|
||||
continue;
|
||||
|
||||
if (sbuf_len(sb) != 0)
|
||||
sbuf_cat(sb, ",");
|
||||
|
||||
sbuf_printf(sb, "%s%d", periph->periph_name,
|
||||
periph->unit_number);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
xpt_unlock_buses();
|
||||
return (count);
|
||||
}
|
||||
|
||||
cam_status
|
||||
cam_periph_acquire(struct cam_periph *periph)
|
||||
{
|
||||
@ -654,12 +687,12 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
|
||||
dirs[1] = CAM_DIR_IN;
|
||||
numbufs = 2;
|
||||
break;
|
||||
case XPT_GDEV_ADVINFO:
|
||||
if (ccb->cgdai.bufsiz == 0)
|
||||
case XPT_DEV_ADVINFO:
|
||||
if (ccb->cdai.bufsiz == 0)
|
||||
return (0);
|
||||
|
||||
data_ptrs[0] = (uint8_t **)&ccb->cgdai.buf;
|
||||
lengths[0] = ccb->cgdai.bufsiz;
|
||||
data_ptrs[0] = (uint8_t **)&ccb->cdai.buf;
|
||||
lengths[0] = ccb->cdai.bufsiz;
|
||||
dirs[0] = CAM_DIR_IN;
|
||||
numbufs = 1;
|
||||
|
||||
@ -813,9 +846,9 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
|
||||
data_ptrs[0] = &ccb->smpio.smp_request;
|
||||
data_ptrs[1] = &ccb->smpio.smp_response;
|
||||
break;
|
||||
case XPT_GDEV_ADVINFO:
|
||||
case XPT_DEV_ADVINFO:
|
||||
numbufs = min(mapinfo->num_bufs_used, 1);
|
||||
data_ptrs[0] = (uint8_t **)&ccb->cgdai.buf;
|
||||
data_ptrs[0] = (uint8_t **)&ccb->cdai.buf;
|
||||
break;
|
||||
default:
|
||||
/* allow ourselves to be swapped once again */
|
||||
|
@ -142,6 +142,7 @@ cam_status cam_periph_alloc(periph_ctor_t *periph_ctor,
|
||||
char *name, cam_periph_type type, struct cam_path *,
|
||||
ac_callback_t *, ac_code, void *arg);
|
||||
struct cam_periph *cam_periph_find(struct cam_path *path, char *name);
|
||||
int cam_periph_list(struct cam_path *, struct sbuf *);
|
||||
cam_status cam_periph_acquire(struct cam_periph *periph);
|
||||
void cam_periph_release(struct cam_periph *periph);
|
||||
void cam_periph_release_locked(struct cam_periph *periph);
|
||||
@ -200,5 +201,12 @@ cam_periph_owned(struct cam_periph *periph)
|
||||
return (mtx_owned(periph->sim->mtx));
|
||||
}
|
||||
|
||||
static __inline int
|
||||
cam_periph_sleep(struct cam_periph *periph, void *chan, int priority,
|
||||
const char *wmesg, int timo)
|
||||
{
|
||||
return (msleep(chan, periph->sim->mtx, priority, wmesg, timo));
|
||||
}
|
||||
|
||||
#endif /* _KERNEL */
|
||||
#endif /* _CAM_CAM_PERIPH_H */
|
||||
|
@ -287,9 +287,6 @@ static xpt_targetfunc_t xptdeftargetfunc;
|
||||
static xpt_devicefunc_t xptdefdevicefunc;
|
||||
static xpt_periphfunc_t xptdefperiphfunc;
|
||||
static void xpt_finishconfig_task(void *context, int pending);
|
||||
static int xpt_for_all_busses(xpt_busfunc_t *tr_func, void *arg);
|
||||
static int xpt_for_all_devices(xpt_devicefunc_t *tr_func,
|
||||
void *arg);
|
||||
static void xpt_dev_async_default(u_int32_t async_code,
|
||||
struct cam_eb *bus,
|
||||
struct cam_et *target,
|
||||
@ -1105,6 +1102,44 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string)
|
||||
periph->unit_number, announce_string);
|
||||
}
|
||||
|
||||
int
|
||||
xpt_getattr(char *buf, size_t len, const char *attr, struct cam_path *path)
|
||||
{
|
||||
int ret = -1;
|
||||
struct ccb_dev_advinfo cdai;
|
||||
|
||||
memset(&cdai, 0, sizeof(cdai));
|
||||
xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL);
|
||||
cdai.ccb_h.func_code = XPT_DEV_ADVINFO;
|
||||
cdai.bufsiz = len;
|
||||
|
||||
if (!strcmp(attr, "GEOM::ident"))
|
||||
cdai.buftype = CDAI_TYPE_SERIAL_NUM;
|
||||
else if (!strcmp(attr, "GEOM::physpath"))
|
||||
cdai.buftype = CDAI_TYPE_PHYS_PATH;
|
||||
else
|
||||
goto out;
|
||||
|
||||
cdai.buf = malloc(cdai.bufsiz, M_CAMXPT, M_NOWAIT|M_ZERO);
|
||||
if (cdai.buf == NULL) {
|
||||
ret = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
xpt_action((union ccb *)&cdai); /* can only be synchronous */
|
||||
if ((cdai.ccb_h.status & CAM_DEV_QFRZN) != 0)
|
||||
cam_release_devq(cdai.ccb_h.path, 0, 0, 0, FALSE);
|
||||
if (cdai.provsiz == 0)
|
||||
goto out;
|
||||
ret = 0;
|
||||
if (strlcpy(buf, cdai.buf, len) >= len)
|
||||
ret = EFAULT;
|
||||
|
||||
out:
|
||||
if (cdai.buf != NULL)
|
||||
free(cdai.buf, M_CAMXPT);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static dev_match_ret
|
||||
xptbusmatch(struct dev_match_pattern *patterns, u_int num_patterns,
|
||||
struct cam_eb *bus)
|
||||
@ -1241,6 +1276,7 @@ xptdevicematch(struct dev_match_pattern *patterns, u_int num_patterns,
|
||||
|
||||
for (i = 0; i < num_patterns; i++) {
|
||||
struct device_match_pattern *cur_pattern;
|
||||
struct scsi_vpd_device_id *device_id_page;
|
||||
|
||||
/*
|
||||
* If the pattern in question isn't for a device node, we
|
||||
@ -1255,22 +1291,17 @@ xptdevicematch(struct dev_match_pattern *patterns, u_int num_patterns,
|
||||
|
||||
cur_pattern = &patterns[i].pattern.device_pattern;
|
||||
|
||||
/* Error out if mutually exclusive options are specified. */
|
||||
if ((cur_pattern->flags & (DEV_MATCH_INQUIRY|DEV_MATCH_DEVID))
|
||||
== (DEV_MATCH_INQUIRY|DEV_MATCH_DEVID))
|
||||
return(DM_RET_ERROR);
|
||||
|
||||
/*
|
||||
* If they want to match any device node, we give them any
|
||||
* device node.
|
||||
*/
|
||||
if (cur_pattern->flags == DEV_MATCH_ANY) {
|
||||
/* set the copy flag */
|
||||
retval |= DM_RET_COPY;
|
||||
|
||||
|
||||
/*
|
||||
* If we've already decided on an action, go ahead
|
||||
* and return.
|
||||
*/
|
||||
if ((retval & DM_RET_ACTION_MASK) != DM_RET_NONE)
|
||||
return(retval);
|
||||
}
|
||||
if (cur_pattern->flags == DEV_MATCH_ANY)
|
||||
goto copy_dev_node;
|
||||
|
||||
/*
|
||||
* Not sure why someone would do this...
|
||||
@ -1292,11 +1323,22 @@ xptdevicematch(struct dev_match_pattern *patterns, u_int num_patterns,
|
||||
|
||||
if (((cur_pattern->flags & DEV_MATCH_INQUIRY) != 0)
|
||||
&& (cam_quirkmatch((caddr_t)&device->inq_data,
|
||||
(caddr_t)&cur_pattern->inq_pat,
|
||||
1, sizeof(cur_pattern->inq_pat),
|
||||
(caddr_t)&cur_pattern->data.inq_pat,
|
||||
1, sizeof(cur_pattern->data.inq_pat),
|
||||
scsi_static_inquiry_match) == NULL))
|
||||
continue;
|
||||
|
||||
device_id_page = (struct scsi_vpd_device_id *)device->device_id;
|
||||
if (((cur_pattern->flags & DEV_MATCH_DEVID) != 0)
|
||||
&& (device->device_id_len < SVPD_DEVICE_ID_HDR_LEN
|
||||
|| scsi_devid_match((uint8_t *)device_id_page->desc_list,
|
||||
device->device_id_len
|
||||
- SVPD_DEVICE_ID_HDR_LEN,
|
||||
cur_pattern->data.devid_pat.id,
|
||||
cur_pattern->data.devid_pat.id_len) != 0))
|
||||
continue;
|
||||
|
||||
copy_dev_node:
|
||||
/*
|
||||
* If we get to this point, the user definitely wants
|
||||
* information on this device. So tell the caller to copy
|
||||
@ -2889,6 +2931,8 @@ xpt_action_default(union ccb *start_ccb)
|
||||
case XPT_TERM_IO:
|
||||
case XPT_ENG_INQ:
|
||||
/* XXX Implement */
|
||||
printf("%s: CCB type %#x not supported\n", __func__,
|
||||
start_ccb->ccb_h.func_code);
|
||||
start_ccb->ccb_h.status = CAM_PROVIDE_FAIL;
|
||||
if (start_ccb->ccb_h.func_code & XPT_FC_DEV_QUEUED) {
|
||||
xpt_done(start_ccb);
|
||||
@ -3528,16 +3572,12 @@ xpt_path_string(struct cam_path *path, char *str, size_t str_len)
|
||||
path_id_t
|
||||
xpt_path_path_id(struct cam_path *path)
|
||||
{
|
||||
mtx_assert(path->bus->sim->mtx, MA_OWNED);
|
||||
|
||||
return(path->bus->path_id);
|
||||
}
|
||||
|
||||
target_id_t
|
||||
xpt_path_target_id(struct cam_path *path)
|
||||
{
|
||||
mtx_assert(path->bus->sim->mtx, MA_OWNED);
|
||||
|
||||
if (path->target != NULL)
|
||||
return (path->target->target_id);
|
||||
else
|
||||
@ -3547,8 +3587,6 @@ xpt_path_target_id(struct cam_path *path)
|
||||
lun_id_t
|
||||
xpt_path_lun_id(struct cam_path *path)
|
||||
{
|
||||
mtx_assert(path->bus->sim->mtx, MA_OWNED);
|
||||
|
||||
if (path->device != NULL)
|
||||
return (path->device->lun_id);
|
||||
else
|
||||
@ -4242,7 +4280,8 @@ xpt_alloc_target(struct cam_eb *bus, target_id_t target_id)
|
||||
{
|
||||
struct cam_et *target;
|
||||
|
||||
target = (struct cam_et *)malloc(sizeof(*target), M_CAMXPT, M_NOWAIT);
|
||||
target = (struct cam_et *)malloc(sizeof(*target), M_CAMXPT,
|
||||
M_NOWAIT|M_ZERO);
|
||||
if (target != NULL) {
|
||||
struct cam_et *cur_target;
|
||||
|
||||
@ -4330,7 +4369,7 @@ xpt_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
|
||||
device = NULL;
|
||||
} else {
|
||||
device = (struct cam_ed *)malloc(sizeof(*device),
|
||||
M_CAMXPT, M_NOWAIT);
|
||||
M_CAMXPT, M_NOWAIT|M_ZERO);
|
||||
}
|
||||
|
||||
if (device != NULL) {
|
||||
@ -4676,27 +4715,29 @@ xpt_register_async(int event, ac_callback_t *cbfunc, void *cbarg,
|
||||
csa.callback_arg = cbarg;
|
||||
xpt_action((union ccb *)&csa);
|
||||
status = csa.ccb_h.status;
|
||||
|
||||
if (xptpath) {
|
||||
xpt_free_path(path);
|
||||
mtx_unlock(&xsoftc.xpt_lock);
|
||||
|
||||
if ((status == CAM_REQ_CMP) &&
|
||||
(csa.event_enable & AC_FOUND_DEVICE)) {
|
||||
/*
|
||||
* Get this peripheral up to date with all
|
||||
* the currently existing devices.
|
||||
*/
|
||||
xpt_for_all_devices(xptsetasyncfunc, &csa);
|
||||
}
|
||||
if ((status == CAM_REQ_CMP) &&
|
||||
(csa.event_enable & AC_PATH_REGISTERED)) {
|
||||
/*
|
||||
* Get this peripheral up to date with all
|
||||
* the currently existing busses.
|
||||
*/
|
||||
xpt_for_all_busses(xptsetasyncbusfunc, &csa);
|
||||
}
|
||||
}
|
||||
|
||||
if ((status == CAM_REQ_CMP) &&
|
||||
(csa.event_enable & AC_FOUND_DEVICE)) {
|
||||
/*
|
||||
* Get this peripheral up to date with all
|
||||
* the currently existing devices.
|
||||
*/
|
||||
xpt_for_all_devices(xptsetasyncfunc, &csa);
|
||||
}
|
||||
if ((status == CAM_REQ_CMP) &&
|
||||
(csa.event_enable & AC_PATH_REGISTERED)) {
|
||||
/*
|
||||
* Get this peripheral up to date with all
|
||||
* the currently existing busses.
|
||||
*/
|
||||
xpt_for_all_busses(xptsetasyncbusfunc, &csa);
|
||||
}
|
||||
|
||||
return (status);
|
||||
}
|
||||
|
||||
@ -4852,8 +4893,10 @@ camisr_runqueue(void *V_queue)
|
||||
if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0
|
||||
&& (--dev->tag_delay_count == 0))
|
||||
xpt_start_tags(ccb_h->path);
|
||||
if (!device_is_send_queued(dev))
|
||||
xpt_schedule_dev_sendq(ccb_h->path->bus, dev);
|
||||
if (!device_is_send_queued(dev)) {
|
||||
runq = xpt_schedule_dev_sendq(ccb_h->path->bus,
|
||||
dev);
|
||||
}
|
||||
}
|
||||
|
||||
if (ccb_h->status & CAM_RELEASE_SIMQ) {
|
||||
|
@ -103,6 +103,8 @@ cam_status xpt_create_path_unlocked(struct cam_path **new_path_ptr,
|
||||
struct cam_periph *perph,
|
||||
path_id_t path_id,
|
||||
target_id_t target_id, lun_id_t lun_id);
|
||||
int xpt_getattr(char *buf, size_t len, const char *attr,
|
||||
struct cam_path *path);
|
||||
void xpt_free_path(struct cam_path *path);
|
||||
int xpt_path_comp(struct cam_path *path1,
|
||||
struct cam_path *path2);
|
||||
|
@ -97,6 +97,8 @@ struct cam_ed {
|
||||
uint8_t supported_vpds_len;
|
||||
uint32_t device_id_len;
|
||||
uint8_t *device_id;
|
||||
uint8_t physpath_len;
|
||||
uint8_t *physpath; /* physical path string form */
|
||||
struct ata_params ident_data;
|
||||
u_int8_t inq_flags; /*
|
||||
* Current settings for inquiry flags.
|
||||
|
@ -3552,32 +3552,63 @@ scsi_calc_syncparam(u_int period)
|
||||
return (period/400);
|
||||
}
|
||||
|
||||
uint8_t *
|
||||
scsi_get_sas_addr(struct scsi_vpd_device_id *id, uint32_t len)
|
||||
int
|
||||
scsi_devid_is_naa_ieee_reg(uint8_t *bufp)
|
||||
{
|
||||
uint8_t *bufp, *buf_end;
|
||||
struct scsi_vpd_id_descriptor *descr;
|
||||
struct scsi_vpd_id_naa_basic *naa;
|
||||
|
||||
bufp = buf_end = (uint8_t *)id;
|
||||
bufp += SVPD_DEVICE_ID_HDR_LEN;
|
||||
buf_end += len;
|
||||
while (bufp < buf_end) {
|
||||
descr = (struct scsi_vpd_id_descriptor *)bufp;
|
||||
bufp += SVPD_DEVICE_ID_DESC_HDR_LEN;
|
||||
/* Right now, we only care about SAS NAA IEEE Reg addrs */
|
||||
if (((descr->id_type & SVPD_ID_PIV) != 0)
|
||||
&& (descr->proto_codeset >> SVPD_ID_PROTO_SHIFT) ==
|
||||
SCSI_PROTO_SAS
|
||||
&& (descr->id_type & SVPD_ID_TYPE_MASK) == SVPD_ID_TYPE_NAA){
|
||||
naa = (struct scsi_vpd_id_naa_basic *)bufp;
|
||||
if ((naa->naa >> 4) == SVPD_ID_NAA_IEEE_REG)
|
||||
return bufp;
|
||||
}
|
||||
bufp += descr->length;
|
||||
descr = (struct scsi_vpd_id_descriptor *)bufp;
|
||||
naa = (struct scsi_vpd_id_naa_basic *)descr->identifier;
|
||||
if ((descr->id_type & SVPD_ID_TYPE_MASK) != SVPD_ID_TYPE_NAA)
|
||||
return 0;
|
||||
if (descr->length < sizeof(struct scsi_vpd_id_naa_ieee_reg))
|
||||
return 0;
|
||||
if ((naa->naa >> SVPD_ID_NAA_NAA_SHIFT) != SVPD_ID_NAA_IEEE_REG)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
scsi_devid_is_sas_target(uint8_t *bufp)
|
||||
{
|
||||
struct scsi_vpd_id_descriptor *descr;
|
||||
|
||||
descr = (struct scsi_vpd_id_descriptor *)bufp;
|
||||
if (!scsi_devid_is_naa_ieee_reg(bufp))
|
||||
return 0;
|
||||
if ((descr->id_type & SVPD_ID_PIV) == 0) /* proto field reserved */
|
||||
return 0;
|
||||
if ((descr->proto_codeset >> SVPD_ID_PROTO_SHIFT) != SCSI_PROTO_SAS)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t *
|
||||
scsi_get_devid(struct scsi_vpd_device_id *id, uint32_t page_len,
|
||||
scsi_devid_checkfn_t ck_fn)
|
||||
{
|
||||
struct scsi_vpd_id_descriptor *desc;
|
||||
uint8_t *page_end;
|
||||
uint8_t *desc_buf_end;
|
||||
|
||||
page_end = (uint8_t *)id + page_len;
|
||||
if (page_end < id->desc_list)
|
||||
return (NULL);
|
||||
|
||||
desc_buf_end = MIN(id->desc_list + scsi_2btoul(id->length), page_end);
|
||||
|
||||
for (desc = (struct scsi_vpd_id_descriptor *)id->desc_list;
|
||||
desc->identifier <= desc_buf_end
|
||||
&& desc->identifier + desc->length <= desc_buf_end;
|
||||
desc = (struct scsi_vpd_id_descriptor *)(desc->identifier
|
||||
+ desc->length)) {
|
||||
|
||||
if (ck_fn == NULL || ck_fn((uint8_t *)desc) != 0)
|
||||
return (desc->identifier);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@ -4174,6 +4205,77 @@ scsi_read_write(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
timeout);
|
||||
}
|
||||
|
||||
void
|
||||
scsi_receive_diagnostic_results(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
void (*cbfcnp)(struct cam_periph *, union ccb*),
|
||||
uint8_t tag_action, int pcv, uint8_t page_code,
|
||||
uint8_t *data_ptr, uint16_t allocation_length,
|
||||
uint8_t sense_len, uint32_t timeout)
|
||||
{
|
||||
struct scsi_receive_diag *scsi_cmd;
|
||||
|
||||
scsi_cmd = (struct scsi_receive_diag *)&csio->cdb_io.cdb_bytes;
|
||||
memset(scsi_cmd, 0, sizeof(*scsi_cmd));
|
||||
scsi_cmd->opcode = RECEIVE_DIAGNOSTIC;
|
||||
if (pcv) {
|
||||
scsi_cmd->byte2 |= SRD_PCV;
|
||||
scsi_cmd->page_code = page_code;
|
||||
}
|
||||
scsi_ulto2b(allocation_length, scsi_cmd->length);
|
||||
|
||||
cam_fill_csio(csio,
|
||||
retries,
|
||||
cbfcnp,
|
||||
/*flags*/CAM_DIR_IN,
|
||||
tag_action,
|
||||
data_ptr,
|
||||
allocation_length,
|
||||
sense_len,
|
||||
sizeof(*scsi_cmd),
|
||||
timeout);
|
||||
}
|
||||
|
||||
void
|
||||
scsi_send_diagnostic(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
void (*cbfcnp)(struct cam_periph *, union ccb *),
|
||||
uint8_t tag_action, int unit_offline, int device_offline,
|
||||
int self_test, int page_format, int self_test_code,
|
||||
uint8_t *data_ptr, uint16_t param_list_length,
|
||||
uint8_t sense_len, uint32_t timeout)
|
||||
{
|
||||
struct scsi_send_diag *scsi_cmd;
|
||||
|
||||
scsi_cmd = (struct scsi_send_diag *)&csio->cdb_io.cdb_bytes;
|
||||
memset(scsi_cmd, 0, sizeof(*scsi_cmd));
|
||||
scsi_cmd->opcode = SEND_DIAGNOSTIC;
|
||||
|
||||
/*
|
||||
* The default self-test mode control and specific test
|
||||
* control are mutually exclusive.
|
||||
*/
|
||||
if (self_test)
|
||||
self_test_code = SSD_SELF_TEST_CODE_NONE;
|
||||
|
||||
scsi_cmd->byte2 = ((self_test_code << SSD_SELF_TEST_CODE_SHIFT)
|
||||
& SSD_SELF_TEST_CODE_MASK)
|
||||
| (unit_offline ? SSD_UNITOFFL : 0)
|
||||
| (device_offline ? SSD_DEVOFFL : 0)
|
||||
| (self_test ? SSD_SELFTEST : 0)
|
||||
| (page_format ? SSD_PF : 0);
|
||||
scsi_ulto2b(param_list_length, scsi_cmd->length);
|
||||
|
||||
cam_fill_csio(csio,
|
||||
retries,
|
||||
cbfcnp,
|
||||
/*flags*/param_list_length ? CAM_DIR_OUT : CAM_DIR_NONE,
|
||||
tag_action,
|
||||
data_ptr,
|
||||
param_list_length,
|
||||
sense_len,
|
||||
sizeof(*scsi_cmd),
|
||||
timeout);
|
||||
}
|
||||
|
||||
void
|
||||
scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
void (*cbfcnp)(struct cam_periph *, union ccb *),
|
||||
@ -4206,7 +4308,6 @@ scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
sense_len,
|
||||
sizeof(*scsi_cmd),
|
||||
timeout);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -4264,6 +4365,66 @@ scsi_static_inquiry_match(caddr_t inqbuffer, caddr_t table_entry)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare two buffers of vpd device descriptors for a match.
|
||||
*
|
||||
* \param lhs Pointer to first buffer of descriptors to compare.
|
||||
* \param lhs_len The length of the first buffer.
|
||||
* \param rhs Pointer to second buffer of descriptors to compare.
|
||||
* \param rhs_len The length of the second buffer.
|
||||
*
|
||||
* \return 0 on a match, -1 otherwise.
|
||||
*
|
||||
* Treat rhs and lhs as arrays of vpd device id descriptors. Walk lhs matching
|
||||
* agains each element in rhs until all data are exhausted or we have found
|
||||
* a match.
|
||||
*/
|
||||
int
|
||||
scsi_devid_match(uint8_t *lhs, size_t lhs_len, uint8_t *rhs, size_t rhs_len)
|
||||
{
|
||||
struct scsi_vpd_id_descriptor *lhs_id;
|
||||
struct scsi_vpd_id_descriptor *lhs_last;
|
||||
struct scsi_vpd_id_descriptor *rhs_last;
|
||||
uint8_t *lhs_end;
|
||||
uint8_t *rhs_end;
|
||||
|
||||
lhs_end = lhs + lhs_len;
|
||||
rhs_end = rhs + rhs_len;
|
||||
|
||||
/*
|
||||
* rhs_last and lhs_last are the last posible position of a valid
|
||||
* descriptor assuming it had a zero length identifier. We use
|
||||
* these variables to insure we can safely dereference the length
|
||||
* field in our loop termination tests.
|
||||
*/
|
||||
lhs_last = (struct scsi_vpd_id_descriptor *)
|
||||
(lhs_end - __offsetof(struct scsi_vpd_id_descriptor, identifier));
|
||||
rhs_last = (struct scsi_vpd_id_descriptor *)
|
||||
(rhs_end - __offsetof(struct scsi_vpd_id_descriptor, identifier));
|
||||
|
||||
lhs_id = (struct scsi_vpd_id_descriptor *)lhs;
|
||||
while (lhs_id <= lhs_last
|
||||
&& (lhs_id->identifier + lhs_id->length) <= lhs_end) {
|
||||
struct scsi_vpd_id_descriptor *rhs_id;
|
||||
|
||||
rhs_id = (struct scsi_vpd_id_descriptor *)rhs;
|
||||
while (rhs_id <= rhs_last
|
||||
&& (rhs_id->identifier + rhs_id->length) <= rhs_end) {
|
||||
|
||||
if (rhs_id->length == lhs_id->length
|
||||
&& memcmp(rhs_id->identifier, lhs_id->identifier,
|
||||
rhs_id->length) == 0)
|
||||
return (0);
|
||||
|
||||
rhs_id = (struct scsi_vpd_id_descriptor *)
|
||||
(rhs_id->identifier + rhs_id->length);
|
||||
}
|
||||
lhs_id = (struct scsi_vpd_id_descriptor *)
|
||||
(lhs_id->identifier + lhs_id->length);
|
||||
}
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#ifdef _KERNEL
|
||||
static void
|
||||
init_scsi_delay(void)
|
||||
|
@ -115,6 +115,7 @@ struct scsi_request_sense
|
||||
{
|
||||
u_int8_t opcode;
|
||||
u_int8_t byte2;
|
||||
#define SRS_DESC 0x01
|
||||
u_int8_t unused[2];
|
||||
u_int8_t length;
|
||||
u_int8_t control;
|
||||
@ -128,17 +129,33 @@ struct scsi_test_unit_ready
|
||||
u_int8_t control;
|
||||
};
|
||||
|
||||
struct scsi_send_diag
|
||||
{
|
||||
u_int8_t opcode;
|
||||
u_int8_t byte2;
|
||||
#define SSD_UOL 0x01
|
||||
#define SSD_DOL 0x02
|
||||
#define SSD_SELFTEST 0x04
|
||||
#define SSD_PF 0x10
|
||||
u_int8_t unused[1];
|
||||
u_int8_t paramlen[2];
|
||||
u_int8_t control;
|
||||
struct scsi_receive_diag {
|
||||
uint8_t opcode;
|
||||
uint8_t byte2;
|
||||
#define SRD_PCV 0x01
|
||||
uint8_t page_code;
|
||||
uint8_t length[2];
|
||||
uint8_t control;
|
||||
};
|
||||
|
||||
struct scsi_send_diag {
|
||||
uint8_t opcode;
|
||||
uint8_t byte2;
|
||||
#define SSD_UNITOFFL 0x01
|
||||
#define SSD_DEVOFFL 0x02
|
||||
#define SSD_SELFTEST 0x04
|
||||
#define SSD_PF 0x10
|
||||
#define SSD_SELF_TEST_CODE_MASK 0xE0
|
||||
#define SSD_SELF_TEST_CODE_SHIFT 5
|
||||
#define SSD_SELF_TEST_CODE_NONE 0x00
|
||||
#define SSD_SELF_TEST_CODE_BG_SHORT 0x01
|
||||
#define SSD_SELF_TEST_CODE_BG_EXTENDED 0x02
|
||||
#define SSD_SELF_TEST_CODE_BG_ABORT 0x04
|
||||
#define SSD_SELF_TEST_CODE_FG_SHORT 0x05
|
||||
#define SSD_SELF_TEST_CODE_FG_EXTENDED 0x06
|
||||
uint8_t reserved;
|
||||
uint8_t length[2];
|
||||
uint8_t control;
|
||||
};
|
||||
|
||||
struct scsi_sense
|
||||
@ -894,11 +911,12 @@ struct scsi_vpd_id_naa_basic
|
||||
uint8_t naa : 4;
|
||||
uint8_t naa_desig : 4;
|
||||
*/
|
||||
#define SVPD_ID_NAA_NAA_SHIFT 4
|
||||
#define SVPD_ID_NAA_IEEE_EXT 0x02
|
||||
#define SVPD_ID_NAA_LOCAL_REG 0x03
|
||||
#define SVPD_ID_NAA_IEEE_REG 0x05
|
||||
#define SVPD_ID_NAA_IEEE_REG_EXT 0x06
|
||||
uint8_t naa_data[0];
|
||||
uint8_t naa_data[];
|
||||
};
|
||||
|
||||
struct scsi_vpd_id_naa_ieee_extended_id
|
||||
@ -1322,7 +1340,12 @@ void scsi_print_inquiry(struct scsi_inquiry_data *inq_data);
|
||||
|
||||
u_int scsi_calc_syncsrate(u_int period_factor);
|
||||
u_int scsi_calc_syncparam(u_int period);
|
||||
uint8_t * scsi_get_sas_addr(struct scsi_vpd_device_id *id, uint32_t len);
|
||||
|
||||
typedef int (*scsi_devid_checkfn_t)(uint8_t *);
|
||||
int scsi_devid_is_naa_ieee_reg(uint8_t *bufp);
|
||||
int scsi_devid_is_sas_target(uint8_t *bufp);
|
||||
uint8_t * scsi_get_devid(struct scsi_vpd_device_id *id, uint32_t len,
|
||||
scsi_devid_checkfn_t ck_fn);
|
||||
|
||||
void scsi_test_unit_ready(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
void (*cbfcnp)(struct cam_periph *,
|
||||
@ -1439,6 +1462,22 @@ void scsi_synchronize_cache(struct ccb_scsiio *csio,
|
||||
u_int32_t begin_lba, u_int16_t lb_count,
|
||||
u_int8_t sense_len, u_int32_t timeout);
|
||||
|
||||
void scsi_receive_diagnostic_results(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
void (*cbfcnp)(struct cam_periph *,
|
||||
union ccb*),
|
||||
uint8_t tag_action, int pcv,
|
||||
uint8_t page_code, uint8_t *data_ptr,
|
||||
uint16_t allocation_length,
|
||||
uint8_t sense_len, uint32_t timeout);
|
||||
|
||||
void scsi_send_diagnostic(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
void (*cbfcnp)(struct cam_periph *, union ccb *),
|
||||
uint8_t tag_action, int unit_offline,
|
||||
int device_offline, int self_test, int page_format,
|
||||
int self_test_code, uint8_t *data_ptr,
|
||||
uint16_t param_list_length, uint8_t sense_len,
|
||||
uint32_t timeout);
|
||||
|
||||
void scsi_read_write(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
void (*cbfcnp)(struct cam_periph *, union ccb *),
|
||||
u_int8_t tag_action, int readop, u_int8_t byte2,
|
||||
@ -1455,6 +1494,8 @@ void scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries,
|
||||
int scsi_inquiry_match(caddr_t inqbuffer, caddr_t table_entry);
|
||||
int scsi_static_inquiry_match(caddr_t inqbuffer,
|
||||
caddr_t table_entry);
|
||||
int scsi_devid_match(uint8_t *rhs, size_t rhs_len,
|
||||
uint8_t *lhs, size_t lhs_len);
|
||||
|
||||
static __inline void scsi_extract_sense(struct scsi_sense_data *sense,
|
||||
int *error_code, int *sense_key,
|
||||
|
@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/eventhandler.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/cons.h>
|
||||
#include <geom/geom.h>
|
||||
#include <geom/geom_disk.h>
|
||||
#endif /* _KERNEL */
|
||||
|
||||
@ -727,7 +728,8 @@ daclose(struct disk *dp)
|
||||
|
||||
softc = (struct da_softc *)periph->softc;
|
||||
|
||||
if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0) {
|
||||
if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0
|
||||
&& (softc->flags & DA_FLAG_PACK_INVALID) == 0) {
|
||||
union ccb *ccb;
|
||||
|
||||
ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
|
||||
@ -932,6 +934,25 @@ dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t leng
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
dagetattr(struct bio *bp)
|
||||
{
|
||||
int ret = -1;
|
||||
struct cam_periph *periph;
|
||||
|
||||
if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL)
|
||||
return ENXIO;
|
||||
periph = (struct cam_periph *)bp->bio_disk->d_drv1;
|
||||
if (periph->path == NULL)
|
||||
return ENXIO;
|
||||
|
||||
ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute,
|
||||
periph->path);
|
||||
if (ret == 0)
|
||||
bp->bio_completed = bp->bio_length;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
dainit(void)
|
||||
{
|
||||
@ -977,7 +998,8 @@ daoninvalidate(struct cam_periph *periph)
|
||||
bioq_flush(&softc->bio_queue, NULL, ENXIO);
|
||||
|
||||
disk_gone(softc->disk);
|
||||
xpt_print(periph->path, "lost device\n");
|
||||
xpt_print(periph->path, "lost device - %d outstanding\n",
|
||||
softc->outstanding_cmds);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1044,6 +1066,20 @@ daasync(void *callback_arg, u_int32_t code,
|
||||
&& status != CAM_REQ_INPROG)
|
||||
printf("daasync: Unable to attach to new device "
|
||||
"due to status 0x%x\n", status);
|
||||
return;
|
||||
}
|
||||
case AC_ADVINFO_CHANGED:
|
||||
{
|
||||
uintptr_t buftype;
|
||||
|
||||
buftype = (uintptr_t)arg;
|
||||
if (buftype == CDAI_TYPE_PHYS_PATH) {
|
||||
struct da_softc *softc;
|
||||
|
||||
softc = periph->softc;
|
||||
disk_attr_changed(softc->disk, "GEOM::physpath",
|
||||
M_NOWAIT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AC_SENT_BDR:
|
||||
@ -1060,12 +1096,12 @@ daasync(void *callback_arg, u_int32_t code,
|
||||
softc->flags |= DA_FLAG_RETRY_UA;
|
||||
LIST_FOREACH(ccbh, &softc->pending_ccbs, periph_links.le)
|
||||
ccbh->ccb_state |= DA_CCB_RETRY_UA;
|
||||
/* FALLTHROUGH*/
|
||||
}
|
||||
default:
|
||||
cam_periph_async(periph, code, path, arg);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
cam_periph_async(periph, code, path, arg);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1230,17 +1266,6 @@ daregister(struct cam_periph *periph, void *arg)
|
||||
|
||||
TASK_INIT(&softc->sysctl_task, 0, dasysctlinit, periph);
|
||||
|
||||
/*
|
||||
* Add async callbacks for bus reset and
|
||||
* bus device reset calls. I don't bother
|
||||
* checking if this fails as, in most cases,
|
||||
* the system will function just fine without
|
||||
* them and the only alternative would be to
|
||||
* not attach the device on failure.
|
||||
*/
|
||||
xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE,
|
||||
daasync, periph, periph->path);
|
||||
|
||||
/*
|
||||
* Take an exclusive refcount on the periph while dastart is called
|
||||
* to finish the probe. The reference will be dropped in dadone at
|
||||
@ -1301,6 +1326,7 @@ daregister(struct cam_periph *periph, void *arg)
|
||||
softc->disk->d_close = daclose;
|
||||
softc->disk->d_strategy = dastrategy;
|
||||
softc->disk->d_dump = dadump;
|
||||
softc->disk->d_getattr = dagetattr;
|
||||
softc->disk->d_name = "da";
|
||||
softc->disk->d_drv1 = periph;
|
||||
if (cpi.maxio == 0)
|
||||
@ -1313,8 +1339,6 @@ daregister(struct cam_periph *periph, void *arg)
|
||||
softc->disk->d_flags = 0;
|
||||
if ((softc->quirks & DA_Q_NO_SYNC_CACHE) == 0)
|
||||
softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
|
||||
strlcpy(softc->disk->d_ident, cgd->serial_num,
|
||||
MIN(sizeof(softc->disk->d_ident), cgd->serial_num_len + 1));
|
||||
cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor,
|
||||
sizeof(cgd->inq_data.vendor), sizeof(softc->disk->d_descr));
|
||||
strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr));
|
||||
@ -1328,6 +1352,25 @@ daregister(struct cam_periph *periph, void *arg)
|
||||
disk_create(softc->disk, DISK_VERSION);
|
||||
mtx_lock(periph->sim->mtx);
|
||||
|
||||
/*
|
||||
* Add async callbacks for events of interest.
|
||||
* I don't bother checking if this fails as,
|
||||
* in most cases, the system will function just
|
||||
* fine without them and the only alternative
|
||||
* would be to not attach the device on failure.
|
||||
*/
|
||||
xpt_register_async(AC_SENT_BDR | AC_BUS_RESET
|
||||
| AC_LOST_DEVICE | AC_ADVINFO_CHANGED,
|
||||
daasync, periph, periph->path);
|
||||
|
||||
/*
|
||||
* Emit an attribute changed notification just in case
|
||||
* physical path information arrived before our async
|
||||
* event handler was registered, but after anyone attaching
|
||||
* to our disk device polled it.
|
||||
*/
|
||||
disk_attr_changed(softc->disk, "GEOM::physpath", M_NOWAIT);
|
||||
|
||||
xpt_schedule(periph, CAM_PRIORITY_DEV);
|
||||
|
||||
return(CAM_REQ_CMP);
|
||||
@ -1558,7 +1601,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
|
||||
int error;
|
||||
int sf;
|
||||
|
||||
|
||||
if ((csio->ccb_h.ccb_state & DA_CCB_RETRY_UA) != 0)
|
||||
sf = SF_RETRY_UA;
|
||||
else
|
||||
@ -1573,8 +1616,17 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
return;
|
||||
}
|
||||
if (error != 0) {
|
||||
int queued_error;
|
||||
|
||||
if (error == ENXIO) {
|
||||
/*
|
||||
* return all queued I/O with EIO, so that
|
||||
* the client can retry these I/Os in the
|
||||
* proper order should it attempt to recover.
|
||||
*/
|
||||
queued_error = EIO;
|
||||
|
||||
if (error == ENXIO
|
||||
&& (softc->flags & DA_FLAG_PACK_INVALID)== 0) {
|
||||
/*
|
||||
* Catastrophic error. Mark our pack as
|
||||
* invalid.
|
||||
@ -1586,14 +1638,10 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
xpt_print(periph->path,
|
||||
"Invalidating pack\n");
|
||||
softc->flags |= DA_FLAG_PACK_INVALID;
|
||||
queued_error = ENXIO;
|
||||
}
|
||||
|
||||
/*
|
||||
* return all queued I/O with EIO, so that
|
||||
* the client can retry these I/Os in the
|
||||
* proper order should it attempt to recover.
|
||||
*/
|
||||
bioq_flush(&softc->bio_queue, NULL, EIO);
|
||||
bioq_flush(&softc->bio_queue, NULL,
|
||||
queued_error);
|
||||
bp->bio_error = error;
|
||||
bp->bio_resid = bp->bio_bcount;
|
||||
bp->bio_flags |= BIO_ERROR;
|
||||
@ -1626,6 +1674,11 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
if (softc->outstanding_cmds == 0)
|
||||
softc->flags |= DA_FLAG_WENT_IDLE;
|
||||
|
||||
if ((softc->flags & DA_FLAG_PACK_INVALID) != 0) {
|
||||
xpt_print(periph->path, "oustanding %d\n",
|
||||
softc->outstanding_cmds);
|
||||
}
|
||||
|
||||
biodone(bp);
|
||||
break;
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/errno.h>
|
||||
#include <sys/devicestat.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/taskqueue.h>
|
||||
|
||||
#include <cam/cam.h>
|
||||
#include <cam/cam_ccb.h>
|
||||
@ -70,12 +71,14 @@ typedef enum {
|
||||
#define ccb_bp ppriv_ptr1
|
||||
|
||||
struct pass_softc {
|
||||
pass_state state;
|
||||
pass_flags flags;
|
||||
u_int8_t pd_type;
|
||||
union ccb saved_ccb;
|
||||
struct devstat *device_stats;
|
||||
struct cdev *dev;
|
||||
pass_state state;
|
||||
pass_flags flags;
|
||||
u_int8_t pd_type;
|
||||
union ccb saved_ccb;
|
||||
struct devstat *device_stats;
|
||||
struct cdev *dev;
|
||||
struct cdev *alias_dev;
|
||||
struct task add_physpath_task;
|
||||
};
|
||||
|
||||
|
||||
@ -88,6 +91,7 @@ static periph_ctor_t passregister;
|
||||
static periph_oninv_t passoninvalidate;
|
||||
static periph_dtor_t passcleanup;
|
||||
static periph_start_t passstart;
|
||||
static void pass_add_physpath(void *context, int pending);
|
||||
static void passasync(void *callback_arg, u_int32_t code,
|
||||
struct cam_path *path, void *arg);
|
||||
static void passdone(struct cam_periph *periph,
|
||||
@ -168,16 +172,44 @@ passcleanup(struct cam_periph *periph)
|
||||
if (bootverbose)
|
||||
xpt_print(periph->path, "removing device entry\n");
|
||||
devstat_remove_entry(softc->device_stats);
|
||||
|
||||
cam_periph_unlock(periph);
|
||||
taskqueue_drain(taskqueue_thread, &softc->add_physpath_task);
|
||||
|
||||
/*
|
||||
* passcleanup() is indirectly a d_close method via passclose,
|
||||
* so using destroy_dev(9) directly can result in deadlock.
|
||||
*/
|
||||
destroy_dev_sched(softc->dev);
|
||||
cam_periph_lock(periph);
|
||||
|
||||
free(softc, M_DEVBUF);
|
||||
}
|
||||
|
||||
static void
|
||||
pass_add_physpath(void *context, int pending)
|
||||
{
|
||||
struct cam_periph *periph;
|
||||
struct pass_softc *softc;
|
||||
char *physpath;
|
||||
|
||||
/*
|
||||
* If we have one, create a devfs alias for our
|
||||
* physical path.
|
||||
*/
|
||||
periph = context;
|
||||
softc = periph->softc;
|
||||
physpath = malloc(MAXPATHLEN, M_DEVBUF, M_WAITOK);
|
||||
if (xpt_getattr(physpath, MAXPATHLEN,
|
||||
"GEOM::physpath", periph->path) == 0
|
||||
&& strlen(physpath) != 0) {
|
||||
|
||||
make_dev_physpath_alias(MAKEDEV_WAITOK, &softc->alias_dev,
|
||||
softc->dev, softc->alias_dev, physpath);
|
||||
}
|
||||
free(physpath, M_DEVBUF);
|
||||
}
|
||||
|
||||
static void
|
||||
passasync(void *callback_arg, u_int32_t code,
|
||||
struct cam_path *path, void *arg)
|
||||
@ -219,6 +251,20 @@ passasync(void *callback_arg, u_int32_t code,
|
||||
|
||||
break;
|
||||
}
|
||||
case AC_ADVINFO_CHANGED:
|
||||
{
|
||||
uintptr_t buftype;
|
||||
|
||||
buftype = (uintptr_t)arg;
|
||||
if (buftype == CDAI_TYPE_PHYS_PATH) {
|
||||
struct pass_softc *softc;
|
||||
|
||||
softc = (struct pass_softc *)periph->softc;
|
||||
taskqueue_enqueue(taskqueue_thread,
|
||||
&softc->add_physpath_task);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
cam_periph_async(periph, code, path, arg);
|
||||
break;
|
||||
@ -292,11 +338,22 @@ passregister(struct cam_periph *periph, void *arg)
|
||||
mtx_lock(periph->sim->mtx);
|
||||
softc->dev->si_drv1 = periph;
|
||||
|
||||
TASK_INIT(&softc->add_physpath_task, /*priority*/0,
|
||||
pass_add_physpath, periph);
|
||||
|
||||
/*
|
||||
* Add an async callback so that we get
|
||||
* notified if this device goes away.
|
||||
* See if physical path information is already available.
|
||||
*/
|
||||
xpt_register_async(AC_LOST_DEVICE, passasync, periph, periph->path);
|
||||
taskqueue_enqueue(taskqueue_thread, &softc->add_physpath_task);
|
||||
|
||||
/*
|
||||
* Add an async callback so that we get notified if
|
||||
* this device goes away or its physical path
|
||||
* (stored in the advanced info data of the EDT) has
|
||||
* changed.
|
||||
*/
|
||||
xpt_register_async(AC_LOST_DEVICE | AC_ADVINFO_CHANGED,
|
||||
passasync, periph, periph->path);
|
||||
|
||||
if (bootverbose)
|
||||
xpt_announce_periph(periph, NULL);
|
||||
@ -548,8 +605,8 @@ passsendccb(struct cam_periph *periph, union ccb *ccb, union ccb *inccb)
|
||||
&& ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE))
|
||||
|| (ccb->ccb_h.func_code == XPT_DEV_MATCH)
|
||||
|| (ccb->ccb_h.func_code == XPT_SMP_IO)
|
||||
|| ((ccb->ccb_h.func_code == XPT_GDEV_ADVINFO)
|
||||
&& (ccb->cgdai.bufsiz > 0)))) {
|
||||
|| ((ccb->ccb_h.func_code == XPT_DEV_ADVINFO)
|
||||
&& (ccb->cdai.bufsiz > 0)))) {
|
||||
|
||||
bzero(&mapinfo, sizeof(mapinfo));
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user