Re: [patch]apmd ? sign

2015-05-20 Thread Martin, Matthew
  But why is this necessary, haven't seen this in other deamons?
  BTW: isn't the \* FALLTHROUGH *\ comment missing?
 
 It is an old style of coding to allow -? in that way.
 It is bogus.  I mopped up much of the tree (I think around 2005?)
 but there are more opportunities.  Please someone do a comprehensive
 job..

pcregrep -rM 'case.*:\s*default:' /usr/src  finds 795 instances of that
pattern. pcregrep is in devel/pcre if you don't already have it.

-Matthew Martin



Only default to cd with cd in drivehghyh Wrd

2015-01-29 Thread Martin, Matthew
Patch to check for a cd in the drive before defaulting to cd.

Doesn't quite get me another enter during install/upgrade, but I don't know how
to distinguish between install.* and the other media that don't have the sets.


Index: src/distrib/miniroot/install.sub
===
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.809
diff -u -p -u -r1.809 install.sub
--- src/distrib/miniroot/install.sub12 Jan 2015 16:33:31 -  1.809
+++ src/distrib/miniroot/install.sub29 Jan 2015 18:44:00 -
@@ -1605,7 +1605,9 @@ install_sets() {
_d=$CGI_METHOD

ifconfig netboot /dev/null 21  : ${_d:=http}
-   [[ -n $(get_cddevs) ]]  { _locs=cd $_locs; : ${_d:=cd}; }
+   [[ -n $(get_cddevs) ]]  { _locs=cd $_locs; for _cd in 
$(get_cddevs); do
+   disklabel -n ${_cd} /dev/null 21  : ${_d:=cd}  break;
+   done; }
[[ -x /sbin/mount_nfs ]]  _locs=$_locs nfs
: ${_d:=http}


-Matthew Martin



nsd and unbound flags

2014-06-12 Thread Martin, Matthew
Since /var/nsd/etc/nsd.conf is the default path for nsd's config file,
I see no reason to break from the convention, for normal use: .  Same
for unbound.

-Matthew Martin

Index: rc.conf
===
RCS file: /cvs/src/etc/rc.conf,v
retrieving revision 1.189
diff -u -p -r1.189 rc.conf
--- rc.conf 24 Apr 2014 15:05:10 -  1.189
+++ rc.conf 12 Jun 2014 21:49:29 -
@@ -26,8 +26,8 @@ bootparamd_flags=NO   # for normal use: 
 rbootd_flags=NO# for normal use: 
 sshd_flags=  # for normal use: 
 named_flags=NO # for normal use: 
-nsd_flags=NO   # for normal use: -c /var/nsd/etc/nsd.conf
-unbound_flags=NO   # for normal use: -c /var/unbound/etc/unbound.conf
+nsd_flags=NO   # for normal use: 
+unbound_flags=NO   # for normal use: 
 ldattach_flags=NO  # for normal use: [options] linedisc cua-device
 ntpd_flags=NO  # for normal use: 
 isakmpd_flags=NO   # for normal use: 



Re: new OpenSSL flaws

2014-06-05 Thread Martin, Matthew
 That's exactly my though. Specially, because FreeBSD and NetBSD were
 warned, but not OpenBSD. If this was only a rant or any childish
 behavior from them, it's something stupid and, of course, not the right
 thing to do. But hey, we're all human. My real concern is if this
 something else, a hidden agenda, in that this stupid disclosure was
 indeed, carefully planed. One can never have too many conspiracy
 theories. Specially after what has been happening the last year. Thanks
 for the clarification.

Mark Cox claims that the reason OpenBSD was not told is because OpenBSD
is not on the distros mailing list and if we were then they'd be able
to work with other distros on issues in advance.

It's at http://oss-security.openwall.org/wiki/mailing-lists/distros . 

Not saying I believe or disbelieve him, but it can't hurt to join even
if it is only until 5.6 comes out.

- Matthew Martin



Installer overwrites configuration from siteXX

2014-03-31 Thread Martin, Matthew
Diff below changes behavior in the install script to not overwrite etc
files that are already present. This comes up when during install an
interface is configured with dhcp and siteXX configures it statically or
mygate is configured manually during installation and is different in
siteXX. The alternative is to untar siteXX sets specially after the
installer has copied over its config which is quite a bit messier.

This may introduce problems with boot.conf, myname, and sysctl.conf as
they exist in the etc set. Perhaps these files should be handled
separately.

Index: distrib/miniroot/install.sh
===
RCS file: /cvs/src/distrib/miniroot/install.sh,v
retrieving revision 1.246
diff -p -u -r1.246 install.sh
--- distrib/miniroot/install.sh 20 Mar 2014 20:01:28 -  1.246
+++ distrib/miniroot/install.sh 31 Mar 2014 08:26:46 -
@@ -267,7 +267,7 @@ _f=dhclient.conf
 # myname ttys boot.conf resolv.conf sysctl.conf resolv.conf.tail
 # Save only non-empty (-s) regular (-f) files.
 (cd /tmp; for _f in fstab hostname* kbdtype my* ttys *.conf *.tail; do
-   [[ -f $_f  -s $_f ]]  mv $_f /mnt/etc/.
+   [[ -f $_f  -s $_f ]]  { echo n | mv -i $_f /mnt/etc/. 2/dev/null }
 done)

 apply


-Matthew Martin



Installer overwrites configuration from siteXX

2014-03-31 Thread Martin, Matthew
Would changing the installer to untar site*.tgz right before finish_up
in install.sh be amenable? This would complicate the logic for
install_files, but hopefully provide the least amount of surprises for
all and allow for adding new files in the base install.

-Matthew Martin


From: Theo de Raadt [dera...@cvs.openbsd.org]
Sent: Monday, March 31, 2014 18:42
To: Martin, Matthew
Cc: tech@openbsd.org
Subject: Re: Installer overwrites configuration from siteXX

That is a very dangerous direction.

Inevitably, site*.tgz will need refactoring or replacement in the
coming years.  What you submitted will surprise people, just like you
were surprised the files are replaced.

I think this will cause further damage.  For instance, if we start
shipping these files in the base install, suddenly the install script
will break.  Complex semantic..

 Diff below changes behavior in the install script to not overwrite etc
 files that are already present. This comes up when during install an
 interface is configured with dhcp and siteXX configures it statically or
 mygate is configured manually during installation and is different in
 siteXX. The alternative is to untar siteXX sets specially after the
 installer has copied over its config which is quite a bit messier.

 This may introduce problems with boot.conf, myname, and sysctl.conf as
 they exist in the etc set. Perhaps these files should be handled
 separately.

 Index: distrib/miniroot/install.sh
 ===
 RCS file: /cvs/src/distrib/miniroot/install.sh,v
 retrieving revision 1.246
 diff -p -u -r1.246 install.sh
 --- distrib/miniroot/install.sh   20 Mar 2014 20:01:28 -  1.246
 +++ distrib/miniroot/install.sh   31 Mar 2014 08:26:46 -
 @@ -267,7 +267,7 @@ _f=dhclient.conf
  # myname ttys boot.conf resolv.conf sysctl.conf resolv.conf.tail
  # Save only non-empty (-s) regular (-f) files.
  (cd /tmp; for _f in fstab hostname* kbdtype my* ttys *.conf *.tail; do
 - [[ -f $_f  -s $_f ]]  mv $_f /mnt/etc/.
 + [[ -f $_f  -s $_f ]]  { echo n | mv -i $_f /mnt/etc/. 2/dev/null }
  done)

  apply