Christos Zoulas | 23 Jul 12:38 2014

is there any value in secure path?

I am asking because I intend to change it to abort() with an error message
and remove it's two uses.

    - There are only 2 uses of it in the tree
    - It suffers from TOCTOU
    - It does not do what it claims (it checks the file not the full path)
    - It can be easily circumvented
    - It is not standard

While it would be useful to have such a function, that takes a path and
returns a file descriptor if the path and the file are "trusted" (what
that means needs to be defined), this function is not it...


Manuel Bouyer | 22 Jul 15:02 2014

xterm (sometimes) needs -lm

while building a evbarm release with some specific CPUFLAGS:
-mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -funsafe-math-optimizations

I ran into an error building xterm: undefined references to pow
pow(3) is defined in libm and xterm doesn't reference it explicitely.
But it does some double computations; I suspect some optimisation
comes with calling pow.

Anyone know what could be going on here ? blindly adding -lm in xterm's
Makefile seems wrong ...


Manuel Bouyer <bouyer <at>>
     NetBSD: 26 ans d'experience feront toujours la difference

Marc Balmer | 19 Jul 19:18 2014

Not so technical, but your feedback is requested

We are soliciting opinions about removing the file /usr/share/misc/airports.  The file might have been
useful in past times, but in 2014 maybe not so much anymore.

Reasons are:

- The file is outdated compared to  IATA sources
- The information is available online and more complete/accurate there
- Why keep a local copy of thia very particular information when it is impractical to maintain?  FWIW,  there
is also an ICAO list of airport codes; and an IATA list of tailway stations etc. do we have these?  No. So why
keep a list of airports?
- Changes to this file have recently been used to make politcal statements, leading to data no longer being
compatible with IATA listings.

(In my personal opinion, the file is almost always outdated, incomplete and otherwise more or less unusable.)

D'Arcy J.M. Cain | 18 Jul 22:22 2014

Alternative to hash-bang

There is currently a discussion in the PostgreSQL list about how to get
unix systems to read an SQL script and run it without choking on
invalid statements such as "#! usr/whatever/bin/psql" at the top of the
file.  It occurred to me that the old hash-bang thing was a little
restrictive and perhaps it is time to add to the list of magic numbers
that run commands using alternative commenting character.  I am
thinking "--!!" for SQL scripts.  The ';' character is also common so
perhaps ";!" as well.  Those two, with "#!" probably cover 99% of the
possible commenting methods.  Would doing this interfere with anything
else?  Or should it be PostgreSQL's job to ignore the shebang if it sees
it at the start of its input?

By the way, "man magic" points to /usr/share/misc/magic which doesn't
actually exist.  There is a binary file /usr/share/misc/magic.mgc which
I assume has the data in a format that reads faster but maybe the
source information should be put into the file mentioned by the man
page.  If not then I think the man page should be fixed.


D'Arcy J.M. Cain <darcy <at>> IM:darcy <at> Vex.Net

enh | 14 Jul 20:06 2014

grep/util.c type mismatch

building NetBSD's grep for Android/x86, i get:

grep/util.c:332:9: error: format '%lc' expects argument of type
'wchar_t *', but argument 3 has type 'wint_t *' [-Werror=format=]
         "%lc", &wbegin) != 1)
grep/util.c:336:9: error: format '%lc' expects argument of type
'wchar_t *', but argument 3 has type 'wint_t *' [-Werror=format=]
         "%lc", &wend) != 1)

cvs diff: Diffing .
Index: util.c
RCS file: /cvsroot/src/usr.bin/grep/util.c,v
retrieving revision 1.17
diff -u -r1.17 util.c
--- util.c 21 Jan 2013 03:24:43 -0000 1.17
+++ util.c 14 Jul 2014 18:05:23 -0000
 <at>  <at>  -324,7 +324,7  <at>  <at> 
  /* Check for whole word match */
  if (fg_pattern[i].word && pmatch.rm_so != 0) {
- wint_t wbegin, wend;
+ wchar_t wbegin, wend;

  wbegin = wend = L' ';
  if (pmatch.rm_so != 0 &&
cvs diff: Diffing nls

(Continue reading)

Heather Walker | 13 Jul 14:55 2014


I am Heather Walker,This is my Third Email to you,I am at the end of the
road, and about to donate a huge amount through you. I promise that your
assistance would be rewarded. Please reply back to me for more
information. Remain Blessed

enh | 11 Jul 04:06 2014

grep.c usage bug

arm just sent us (Android) this:

here's the equivalent diff against NetBSD:

cvs diff: Diffing .
Index: grep.c
RCS file: /cvsroot/src/usr.bin/grep/grep.c,v
retrieving revision 1.11
diff -u -r1.11 grep.c
--- grep.c 6 May 2012 22:27:00 -0000 1.11
+++ grep.c 11 Jul 2014 02:05:44 -0000
 <at>  <at>  -159,7 +159,6  <at>  <at> 
  fprintf(stderr, getstr(4), __progname);
  fprintf(stderr, "%s", getstr(5));
- fprintf(stderr, "%s", getstr(5));
  fprintf(stderr, "%s", getstr(6));
  fprintf(stderr, "%s", getstr(7));
cvs diff: Diffing nls

Emmanuel Dreyfus | 10 Jul 15:49 2014

Linux truncate(1) equivalent?


Do we have an équivalent of Linux truncate(1)? It calls truncate(2)
to resize a file.

I tried dd with seek with no success.


Emmanuel Dreyfus
manu <at>

rudolf | 1 Jul 14:56 2014

kevent(2): EVFILT_VNODE filter miscounting hardlinks?


if there is a EVFILT_VNODE filter watching a directory (e.g. 
"/tmp/watchdir"), it does not return NOTE_LINK (it only returns 
NOTE_WRITE) upon a move of a directory from or into the watched 
directory (e.g. "mkdir /tmp/foo; mv /tmp/foo /tmp/watchdir/"). This 
seems like a bug to me. Should I submit a PR?

Note: the filter correctly returns NOTE_LINK (and NOTE_WRITE) upon a 
mkdir in the watched directory (e.g. "mkdir /tmp/watchdir/bar").

I've observed this behavior under NetBSD 6.1_STABLE amd64 using a test 
program from PR kern/34267.



Alistair Crooks | 26 Jun 03:20 2014

Removing SCCS Ids from legacy code

The core team has looked at the question of deleting the SCCS Ids from
legacy code in our repositories, and found that there are no
appreciable benefits, and some real losses; some people actively use
these identifiers often enough for them to be needed, especially when
merging from other repositories.  None of these other repositories has
yet to delete SCCS Ids from their copies, either.

However, the preprocessor conditionals surrounding some SCCS Ids can
be simplified without any loss.

Alistair Crooks
On behalf of the core team

Jeremy C. Reed | 25 Jun 19:52 2014

add login.conf to getent(1)

May I commit the following?  It adds "login.conf" to getent(1) and minor 
manual page improvements.

Index: getent.1
RCS file: /cvsroot/src/usr.bin/getent/getent.1,v
retrieving revision 1.23
diff -u -r1.23 getent.1
--- getent.1	11 Oct 2011 20:39:40 -0000	1.23
+++ getent.1	25 Jun 2014 17:51:33 -0000
 <at>  <at>  -27,7 +27,7  <at>  <at> 
-.Dd October 11, 2011
+.Dd June 25, 2014
 <at>  <at>  -45,8 +45,8  <at>  <at> 
 program retrieves and displays entries from the administrative
 database specified by
-.Ar database ,
-using the lookup order specified in
+.Ar database .
+If applicable, it uses the lookup order specified in
 .Xr nsswitch.conf 5 .
 The display format for a given
 .Ar database
(Continue reading)