Re: bin/173454: [patch] service(8) does not respect /etc/rc.conf.d/name

2014-04-08 Thread Aslak Raanes
The following reply was made to PR bin/173454; it has been noted by GNATS.

From: "Aslak Raanes" 
To: bug-follo...@freebsd.org, g...@rambler-co.ru
Cc:  
Subject: Re: bin/173454: [patch] service(8) does not respect
 /etc/rc.conf.d/name
Date: Tue, 08 Apr 2014 16:16:26 +0200

 It seems like this bug still apply to 10.0-RELEASE. Since 
 /etc/rc.conf.d/ overrides /etc/rc.conf, using `service -e` will give a 
 wrong impression on which services are enabled.
 
 
  $ uname -sr
  FreeBSD 10.0-RELEASE
 
  $ service -e | grep bsnmpd
 
  $ service bsnmpd rcvar
  # bsnmpd
  #
  bsnmpd_enable="NO"
  #   (default: "")
 
  $ echo 'bsnmpd_enable="YES"' >> /etc/rc.conf
 
  $ service -e | grep bsnmpd
  /etc/rc.d/bsnmpd
 
  $ service bsnmpd rcvar
  # bsnmpd
  #
  bsnmpd_enable="YES"
  #   (default: "")
 
  $ echo 'bsnmpd_enable="NO"' >> /etc/rc.conf.d/bsnmpd
 
  $ service -e| grep bsnmpd
  /etc/rc.d/bsnmpd
 
  $ service bsnmpd rcvar
  # bsnmpd
  #
  bsnmpd_enable="NO"
  #   (default: "")
 
  $ /etc/rc.d/bsnmpd start
  Cannot 'start' bsnmpd. Set bsnmpd_enable to YES in /etc/rc.conf or 
 use 'onestart' instead of 'start'.
 
  $ echo 'bsnmpd_enable="YES"' >> /etc/rc.conf.d/bsnmpd
 
  $ service bsnmpd rcvar
  # bsnmpd
  #
  bsnmpd_enable="YES"
  #   (default: "")
 
  $ echo 'bsnmpd_enable="NO"' >> /etc/rc.conf
 
  $ grep bsnmpd_enable /etc/rc.conf
  bsnmpd_enable="YES"
  bsnmpd_enable="NO"
 
  $ cat /etc/rc.conf.d/bsnmpd
  bsnmpd_enable="NO"
  bsnmpd_enable="YES"
 
  $ service bsnmpd rcvar
  # bsnmpd
  #
  bsnmpd_enable="YES"
  #   (default: "")
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/188196: commit references a PR

2014-04-08 Thread dfilter service
The following reply was made to PR kern/188196; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: kern/188196: commit references a PR
Date: Tue,  8 Apr 2014 14:14:31 + (UTC)

 Author: ray
 Date: Tue Apr  8 14:14:25 2014
 New Revision: 264258
 URL: http://svnweb.freebsd.org/changeset/base/264258
 
 Log:
   Fix cursor color in reverse video mode.
   
   PR:  kern/188196
   Submitted by:Claude Buisson  (original version)
   MFC after:   1 week
   Sponsored by:The FreeBSD Foundation
 
 Modified:
   head/sys/dev/vt/vt_core.c
 
 Modified: head/sys/dev/vt/vt_core.c
 ==
 --- head/sys/dev/vt/vt_core.c  Tue Apr  8 07:32:32 2014(r264257)
 +++ head/sys/dev/vt/vt_core.c  Tue Apr  8 14:14:25 2014(r264258)
 @@ -652,24 +652,26 @@ static inline void
  vt_determine_colors(term_char_t c, int cursor,
  term_color_t *fg, term_color_t *bg)
  {
 +  term_color_t tmp;
 +  int invert;
 +
 +  invert = 0;
  
*fg = TCHAR_FGCOLOR(c);
if (TCHAR_FORMAT(c) & TF_BOLD)
*fg = TCOLOR_LIGHT(*fg);
*bg = TCHAR_BGCOLOR(c);
  
 -  if (TCHAR_FORMAT(c) & TF_REVERSE) {
 -  term_color_t tmp;
 +  if (TCHAR_FORMAT(c) & TF_REVERSE)
 +  invert ^= 1;
 +  if (cursor)
 +  invert ^= 1;
  
 +  if (invert) {
tmp = *fg;
*fg = *bg;
*bg = tmp;
}
 -
 -  if (cursor) {
 -  *fg = *bg;
 -  *bg = TC_WHITE;
 -  }
  }
  
  static void
 ___
 svn-src-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
 
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/188196: [vt] [patch] vt(4) text cursor invisible in reverse video

2014-04-08 Thread ray
Synopsis: [vt] [patch] vt(4) text cursor invisible in reverse video

State-Changed-From-To: open->closed
State-Changed-By: ray
State-Changed-When: Tue Apr 8 20:39:08 UTC 2014
State-Changed-Why: 

Problem fixed.

http://www.freebsd.org/cgi/query-pr.cgi?pr=188196
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/188196: [vt] [patch] vt(4) text cursor invisible in reverse video

2014-04-08 Thread ray
Synopsis: [vt] [patch] vt(4) text cursor invisible in reverse video

Responsible-Changed-From-To: freebsd-bugs->ray
Responsible-Changed-By: ray
Responsible-Changed-When: Tue Apr 8 20:56:30 UTC 2014
Responsible-Changed-Why: 
Over to maintainer.

http://www.freebsd.org/cgi/query-pr.cgi?pr=188196
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/187654: Panic on system resume (swi4: clock)

2014-04-08 Thread ray
Synopsis: Panic on system resume  (swi4: clock)

Responsible-Changed-From-To: freebsd-bugs->ray
Responsible-Changed-By: ray
Responsible-Changed-When: Tue Apr 8 21:46:41 UTC 2014
Responsible-Changed-Why: 
Over to maintainer.

http://www.freebsd.org/cgi/query-pr.cgi?pr=187654
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: junk/188378: QL6ahsah

2014-04-08 Thread linimon
Synopsis: QL6ahsah

State-Changed-From-To: open->closed
State-Changed-By: linimon
State-Changed-When: Tue Apr 8 23:40:30 UTC 2014
State-Changed-Why: 
spam


Responsible-Changed-From-To: freebsd-bugs->gnats-adm
Responsible-Changed-By: linimon
Responsible-Changed-When: Tue Apr 8 23:40:30 UTC 2014
Responsible-Changed-Why: 

http://www.freebsd.org/cgi/query-pr.cgi?pr=188378
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/181497: [kernel] [patch] Add ASLR feature to kernel

2014-04-08 Thread Oliver Pinter
On 3/22/14, Shawn Webb  wrote:
> The following reply was made to PR kern/181497; it has been noted by GNATS.
>
> From: Shawn Webb 
> To: bug-follo...@freebsd.org
> Cc:
> Subject: Re: kern/181497: [kernel] [patch] Add ASLR feature to kernel
> Date: Fri, 21 Mar 2014 20:49:01 -0400
>
>  --Apple-Mail=_3B294110-F7A1-429D-BF98-4300F2774717
>  Content-Transfer-Encoding: 7bit
>  Content-Type: text/plain;
>   charset=us-ascii
>
>  The attached patch provides better stability to the new PIE feature.
>
>
>  --Apple-Mail=_3B294110-F7A1-429D-BF98-4300F2774717
>  Content-Disposition: attachment;
>   filename=aslr-2014-03-21_02.patch.txt
>  Content-Type: text/plain;
>   name="aslr-2014-03-21_02.patch.txt"
>  Content-Transfer-Encoding: quoted-printable
>
>  diff --git a/sys/compat/freebsd32/freebsd32_misc.c =
>  b/sys/compat/freebsd32/freebsd32_misc.c
>  index b093a76..1bf0d12 100644
>  --- a/sys/compat/freebsd32/freebsd32_misc.c
>  +++ b/sys/compat/freebsd32/freebsd32_misc.c
>  @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
>   #include "opt_compat.h"
>   #include "opt_inet.h"
>   #include "opt_inet6.h"
>  +#include "opt_pax.h"
>  =20
>   #define __ELF_WORD_SIZE 32
>  =20
>  @@ -113,6 +114,10 @@ __FBSDID("$FreeBSD$");
>  =20
>   FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD");
>  =20
>  +#ifdef PAX_ASLR
>  +#include 
>  +#endif /* PAX_ASLR */
>  +
>   #ifndef __mips__
>   CTASSERT(sizeof(struct timeval32) =3D=3D 8);
>   CTASSERT(sizeof(struct timespec32) =3D=3D 8);
>  @@ -2822,6 +2827,9 @@ freebsd32_copyout_strings(struct image_params =
>  *imgp)
>   {
>   int argc, envc, i;
>   u_int32_t *vectp;
>  +#ifdef PAX_ASLR
>  +uintptr_t orig_destp;
>  +#endif /* PAX_ASLR */
>   char *stringp;
>   uintptr_t destp;
>   u_int32_t *stack_base;
>  @@ -2847,6 +2855,11 @@ freebsd32_copyout_strings(struct image_params =
>  *imgp)
>   szsigcode =3D 0;
>   destp =3D   (uintptr_t)arginfo;
>  =20
>  +#ifdef PAX_ASLR
>  +orig_destp =3D destp;
>  +pax_aslr_stack(curthread, &destp, orig_destp);
>  +#endif /* PAX_ASLR */
>  +
>   /*
>* install sigcode
>*/
>  diff --git a/sys/conf/files b/sys/conf/files
>  index 596cc69..c2e59ca 100644
>  --- a/sys/conf/files
>  +++ b/sys/conf/files
>  @@ -2835,6 +2835,7 @@ kern/kern_mtxpool.cstandard
>   kern/kern_mutex.c   standard
>   kern/kern_ntptime.c standard
>   kern/kern_osd.c standard
>  +kern/kern_pax.c optional pax_aslr
>   kern/kern_physio.c  standard
>   kern/kern_pmc.c standard
>   kern/kern_poll.coptional device_polling
>  diff --git a/sys/conf/options b/sys/conf/options
>  index 75fe424..ecabb5f 100644
>  --- a/sys/conf/options
>  +++ b/sys/conf/options
>  @@ -910,6 +910,9 @@ RACCTopt_global.h
>   # Resource Limits
>   RCTLopt_global.h
>  =20
>  +# PaX - hardening options
>  +PAX_ASLRopt_pax.h
>  +PAX_ASLR_MAX_SECopt_pax.h
>   # Random number generator(s)
>   RANDOM_YARROW   opt_random.h
>   RANDOM_FORTUNA  opt_random.h
>  diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
>  index d5ec365..68852bb 100644
>  --- a/sys/kern/imgact_elf.c
>  +++ b/sys/kern/imgact_elf.c
>  @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
>   #include "opt_capsicum.h"
>   #include "opt_compat.h"
>   #include "opt_core.h"
>  +#include "opt_pax.h"
>  =20
>   #include 
>   #include 
>  @@ -47,7 +48,9 @@ __FBSDID("$FreeBSD$");
>   #include 
>   #include 
>   #include 
>  +#include 
>   #include 
>  +#include 
>   #include 
>   #include 
>   #include 
>  @@ -600,6 +603,9 @@ __elfN(load_file)(struct proc *p, const char *file, =
>  u_long *addr,
>   u_long rbase;
>   u_long base_addr =3D 0;
>   int error, i, numsegs;
>  +#ifdef PAX_ASLR
>  +struct prison *pr;
>  +#endif
>  =20
>   #ifdef CAPABILITY_MODE
>   /*
>  @@ -655,11 +661,17 @@ __elfN(load_file)(struct proc *p, const char =
>  *file, u_long *addr,
>   hdr =3D (const Elf_Ehdr *)imgp->image_header;
>   if ((error =3D __elfN(check_header)(hdr)) !=3D 0)
>   goto fail;
>  -if (hdr->e_type =3D=3D ET_DYN)
>  +if (hdr->e_type =3D=3D ET_DYN) {
>   rbase =3D *addr;
>  -else if (hdr->e_type =3D=3D ET_EXEC)
>  +#ifdef PAX_ASLR
>  +if (pax_aslr_active(NULL, imgp->proc)) {
>  +pr =3D pax_aslr_get_prison(NULL, imgp->proc);
>  +rbase +=3D round_page(PAX_ASLR_DELTA(arc4random(), =
>  PAX_ASLR_DELTA_EXEC_LSB, pr->pr_pax_aslr_exec_len));
>  +}
>  +#endif
>  +} else if (hdr->e_type =3D=3D ET_EXEC) {
>   rbase =3D 0;
>  -else {
>  +} else {
>   error =3D ENOEXEC;
>   goto fail;
>   }
>  @@ -729,6 +741,9 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params =
>  *imgp)
>   Elf_Brandinfo *brand_info;
>   char *path;
>   struct sysentvec *sv;
>  +#ifdef PAX_ASLR
>  +stru