svn commit: r297057 - head/usr.bin/localedef

2016-03-19 Thread Pedro F. Giffuni
Author: pfg Date: Sun Mar 20 03:27:06 2016 New Revision: 297057 URL: https://svnweb.freebsd.org/changeset/base/297057 Log: localedef(1): minor sorting to match Illumos. Illumos recently included space in 'print' class. We already had this but the code had slight sorting differences. Move

svn commit: r296816 - head/cddl/contrib/opensolaris/lib/libdtrace/common

2016-03-13 Thread Pedro F. Giffuni
Author: pfg Date: Mon Mar 14 00:34:12 2016 New Revision: 296816 URL: https://svnweb.freebsd.org/changeset/base/296816 Log: libdtrace: use calloc(3) instead of malloc(3) when it makes sense. calloc(3) is faster and occasionally safer than malloc(3) + bzero(3). In one case, pointed out

svn commit: r296435 - in head/lib/libedit: . TEST edit/readline

2016-03-06 Thread Pedro F. Giffuni
Author: pfg Date: Sun Mar 6 21:32:54 2016 New Revision: 296435 URL: https://svnweb.freebsd.org/changeset/base/296435 Log: Revert r296175 Undo update of libedit 2016-02-27 Something in libedit appears to be causing breakage in lldb38. The changes are not generally huge but they are

svn commit: r296404 - head/lib/libc/rpc

2016-03-04 Thread Pedro F. Giffuni
Author: pfg Date: Sat Mar 5 01:17:23 2016 New Revision: 296404 URL: https://svnweb.freebsd.org/changeset/base/296404 Log: Stray tabs and spaces. No functional change. Modified: head/lib/libc/rpc/rtime.c Modified: head/lib/libc/rpc/rtime.c

svn commit: r296394 - head/include/rpc

2016-03-04 Thread Pedro F. Giffuni
Author: pfg Date: Fri Mar 4 22:03:38 2016 New Revision: 296394 URL: https://svnweb.freebsd.org/changeset/base/296394 Log: xdr: Fix xdr_rpc* defines. The defines for xdr_rpc* in xdr.h are wrong. It could be very well that Solaris did strip the '_t' from xdr_u_int32_t, but Solaris has a

svn commit: r296386 - head/lib/libc/rpc

2016-03-04 Thread Pedro F. Giffuni
Author: pfg Date: Fri Mar 4 15:30:41 2016 New Revision: 296386 URL: https://svnweb.freebsd.org/changeset/base/296386 Log: Work around aliasing issues detected in modern GCC. Avoid casting gymnastics that lead to pointer aliasing by introducing an inline function as done in NetBSD (but

svn commit: r296349 - head/include/rpc

2016-03-03 Thread Pedro F. Giffuni
Author: pfg Date: Thu Mar 3 14:44:30 2016 New Revision: 296349 URL: https://svnweb.freebsd.org/changeset/base/296349 Log: Add sunrpc compat define for xp_sock. SunRPC is using xp_sock in SVCXPRT, while TI-RPC is using xp_fd. Add a compatibility define. Illumos has something similar

svn commit: r296351 - head/contrib/openresolv

2016-03-03 Thread Pedro F. Giffuni
Author: pfg Date: Thu Mar 3 15:36:00 2016 New Revision: 296351 URL: https://svnweb.freebsd.org/changeset/base/296351 Log: MFV r296350: Split each domain again after striping any trailing dot. Reported by: dumbbell Obtained from:openresolv (53416cf1b4) Modified:

svn commit: r296278 - head/lib/libc/locale

2016-03-01 Thread Pedro F. Giffuni
Author: pfg Date: Tue Mar 1 19:15:34 2016 New Revision: 296278 URL: https://svnweb.freebsd.org/changeset/base/296278 Log: mbtowc(3): set errno to EILSEQ if an incomplete character is passed. According to POSIX, The mbtowc() function shall fail if: [EILSEQ] An invalid character sequence

svn commit: r296190 - head/contrib/openresolv

2016-02-29 Thread Pedro F. Giffuni
Author: pfg Date: Mon Feb 29 14:46:39 2016 New Revision: 296190 URL: https://svnweb.freebsd.org/changeset/base/296190 Log: MFV r296164: Update openresolve to version 3.7.3 including: * Save the initial working directory and change to it just before running any scripts.

svn commit: r296175 - in head/lib/libedit: . TEST edit/readline

2016-02-28 Thread Pedro F. Giffuni
Author: pfg Date: Mon Feb 29 00:15:25 2016 New Revision: 296175 URL: https://svnweb.freebsd.org/changeset/base/296175 Log: MFV r296159 Sync our libedit with NetBSD's libedit 2016-02-27. Obtained from:NetBSD Modified: head/lib/libedit/Makefile head/lib/libedit/TEST/tc1.c

svn commit: r296134 - head/libexec/getty

2016-02-26 Thread Pedro F. Giffuni
Author: pfg Date: Sat Feb 27 02:11:00 2016 New Revision: 296134 URL: https://svnweb.freebsd.org/changeset/base/296134 Log: Missing tab. Pointed out by: bapt Modified: head/libexec/getty/subr.c Modified: head/libexec/getty/subr.c

svn commit: r296133 - in head: include/rpc lib/libc/rpc

2016-02-26 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 26 23:25:21 2016 New Revision: 296133 URL: https://svnweb.freebsd.org/changeset/base/296133 Log: RPC: update the getrpcbyname() definition to include a const qualifier. Add const qualifier making getrpcbyname() and getrpcbyname_r() prototypes match those used in

svn commit: r296132 - head/usr.sbin/pciconf

2016-02-26 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 26 23:12:59 2016 New Revision: 296132 URL: https://svnweb.freebsd.org/changeset/base/296132 Log: pciconf: Silence a GCC warning. Fix the build on sparc64 and powerpc. Taken from: wma Modified: head/usr.sbin/pciconf/cap.c Modified:

svn commit: r296109 - head/libexec/rlogind

2016-02-26 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 26 20:02:01 2016 New Revision: 296109 URL: https://svnweb.freebsd.org/changeset/base/296109 Log: rlogin(1): Replace select(2) with poll(2). Obtanied from:NetBSD (CVS Rev. 1.27 - 1.28) Modified: head/libexec/rlogind/rlogind.c Modified:

svn commit: r296107 - head/libexec/getty

2016-02-26 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 26 19:35:51 2016 New Revision: 296107 URL: https://svnweb.freebsd.org/changeset/base/296107 Log: getty(8): Undo incomplete support VEOL2 and VSTATUS. Forgot to add some definitions for charnames[]. Modified: head/libexec/getty/subr.c Modified:

svn commit: r296106 - head/libexec/getty

2016-02-26 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 26 19:08:37 2016 New Revision: 296106 URL: https://svnweb.freebsd.org/changeset/base/296106 Log: getty(8): Support VEOL2 and VSTATUS Bring some type cleanups while here. Obtained from:NetBSD Modified: head/libexec/getty/subr.c Modified:

svn commit: r296104 - head/libexec/getty

2016-02-26 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 26 18:52:06 2016 New Revision: 296104 URL: https://svnweb.freebsd.org/changeset/base/296104 Log: getty(8): Use poll(2) and nanosleep(2) instead of select(2). Sort headers while here. Obtained from:NetBSD (CVS Rev. 1.25 - 1.26) Modified:

svn commit: r296095 - head/lib/libc/rpc

2016-02-26 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 26 14:39:39 2016 New Revision: 296095 URL: https://svnweb.freebsd.org/changeset/base/296095 Log: rpc: fix failure to clear string by passing the wrong size to memset. Noted by NetBSD's PR/21014 Obtained from:NetBSD (CVS Rev. 1.24, 1.25) MFC after:

svn commit: r296054 - head/usr.bin/talk

2016-02-25 Thread Pedro F. Giffuni
Author: pfg Date: Thu Feb 25 19:06:44 2016 New Revision: 296054 URL: https://svnweb.freebsd.org/changeset/base/296054 Log: talk(1): Replace select(2) with poll(2) Hinted by:OpenBSD and NetBSD Modified: head/usr.bin/talk/ctl_transact.c head/usr.bin/talk/io.c Modified:

svn commit: r295975 - head/lib/libc/db/recno

2016-02-24 Thread Pedro F. Giffuni
Author: pfg Date: Wed Feb 24 17:14:11 2016 New Revision: 295975 URL: https://svnweb.freebsd.org/changeset/base/295975 Log: db(3): Fix aliasing warnings from modern GCC. While here also drop a malloc cast. Obtained from:NetBSD (CVS Rev. 1.18 - 1.20) Modified:

svn commit: r295973 - head/lib/libc/db/btree

2016-02-24 Thread Pedro F. Giffuni
Author: pfg Date: Wed Feb 24 16:52:03 2016 New Revision: 295973 URL: https://svnweb.freebsd.org/changeset/base/295973 Log: db(3): Fix aliasing warnings from modern GCC. Obtained from:NetBSD (CVS Rev. 1.20) Modified: head/lib/libc/db/btree/bt_split.c Modified:

svn commit: r295861 - head/sys/dev/pms/freebsd/driver/ini/src

2016-02-21 Thread Pedro F. Giffuni
Author: pfg Date: Sun Feb 21 16:45:22 2016 New Revision: 295861 URL: https://svnweb.freebsd.org/changeset/base/295861 Log: ostiInitiatorIOCompleted(): wrong sizeof() argument. Detected by: PVS Static Analysis CID: 1331601, 1331523 Modified:

svn commit: r295822 - head/sys/dev/qlxgb

2016-02-19 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 19 18:05:02 2016 New Revision: 295822 URL: https://svnweb.freebsd.org/changeset/base/295822 Log: qlxgb: fix mismatch. Found by: PVS Static Analysis Reviewed by: davidcs MFC after:1 month Modified: head/sys/dev/qlxgb/qla_hw.c Modified:

svn commit: r295811 - head/sys/fs/ext2fs

2016-02-19 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 19 15:53:08 2016 New Revision: 295811 URL: https://svnweb.freebsd.org/changeset/base/295811 Log: Ext2: cleanup setting of ctime/mtime/birthtime. This adopts the same change as r291936 for UFS. Directly clear IN_ACCESS or IN_UPDATE when user supplied the time,

svn commit: r295810 - head/sys/dev/firewire

2016-02-19 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 19 15:35:20 2016 New Revision: 295810 URL: https://svnweb.freebsd.org/changeset/base/295810 Log: firewire: fix a mismatch introduced in r230558. Found by: PVS Static Analysis Reviewed by: sbruno MFC after:1 month Modified:

svn commit: r295675 - head/usr.bin/mail

2016-02-16 Thread Pedro F. Giffuni
Author: pfg Date: Tue Feb 16 21:39:19 2016 New Revision: 295675 URL: https://svnweb.freebsd.org/changeset/base/295675 Log: Fix naive use of ftell(3). Secure coding practices, FIO19-C. Modified: head/usr.bin/mail/def.h Modified: head/usr.bin/mail/def.h

svn commit: r295672 - head/usr.sbin/cron/crontab

2016-02-16 Thread Pedro F. Giffuni
Author: pfg Date: Tue Feb 16 21:19:39 2016 New Revision: 295672 URL: https://svnweb.freebsd.org/changeset/base/295672 Log: crontab: ftruncate() with ftello() instead of ftell(). Obtained from:OpenBSD (CVS rev. 1.47) Modified: head/usr.sbin/cron/crontab/crontab.c Modified:

svn commit: r295671 - head/usr.sbin/cron/cron

2016-02-16 Thread Pedro F. Giffuni
Author: pfg Date: Tue Feb 16 20:59:49 2016 New Revision: 295671 URL: https://svnweb.freebsd.org/changeset/base/295671 Log: cron: use (char *)NULL instead of (char *)0 in execle. Obtained from:OpenBSD (CVS Rev 1.25) Modified: head/usr.sbin/cron/cron/do_command.c Modified:

svn commit: r295638 - head/lib/libc/stdio

2016-02-15 Thread Pedro F. Giffuni
Author: pfg Date: Mon Feb 15 21:18:52 2016 New Revision: 295638 URL: https://svnweb.freebsd.org/changeset/base/295638 Log: fputs: Return the number of bytes written. Fix r295631: wrong value. Pointy hat: pfg (me) Pointed out by: bde Modified: head/lib/libc/stdio/fputs.c

svn commit: r295632 - head/lib/libc/stdio

2016-02-15 Thread Pedro F. Giffuni
Author: pfg Date: Mon Feb 15 18:14:21 2016 New Revision: 295632 URL: https://svnweb.freebsd.org/changeset/base/295632 Log: getln: We cannot expand the buffer beyond INT_MAX. In such cases return ENOMEM. This is a limitation of our implementation, alternatively you may consider

svn commit: r295631 - head/lib/libc/stdio

2016-02-15 Thread Pedro F. Giffuni
Author: pfg Date: Mon Feb 15 18:13:33 2016 New Revision: 295631 URL: https://svnweb.freebsd.org/changeset/base/295631 Log: fputs: Return the number of bytes written. POSIX.1-2008 requires that successful completion simply return a non-negative integer. We have regularly returned a

svn commit: r295616 - head/sys/fs/ext2fs

2016-02-14 Thread Pedro F. Giffuni
Author: pfg Date: Sun Feb 14 19:52:50 2016 New Revision: 295616 URL: https://svnweb.freebsd.org/changeset/base/295616 Log: ext2fs: Remove panics for rename() race conditions. Sync with r84642 from UFS: The panics are inappropriate because the IN_RENAME flag only fixes a few of

svn commit: r295586 - head/sys/fs/cd9660

2016-02-12 Thread Pedro F. Giffuni
Author: pfg Date: Fri Feb 12 22:46:14 2016 New Revision: 295586 URL: https://svnweb.freebsd.org/changeset/base/295586 Log: cd9660: More "check for NULL" cleaunps. Cleanup some checks for NULL. Most of these were always unnecessary and starting with r294954 brelse() doesn't need any NULL

svn commit: r295523 - head/sys/fs/ext2fs

2016-02-11 Thread Pedro F. Giffuni
Author: pfg Date: Thu Feb 11 15:27:14 2016 New Revision: 295523 URL: https://svnweb.freebsd.org/changeset/base/295523 Log: Ext4: Use boolean type instead of '0' and '1' There are precedents of uses of bool in the kernel and it is incorrect style to use integers as replacement for a

svn commit: r295494 - head/sys/fs/ext2fs

2016-02-10 Thread Pedro F. Giffuni
Author: pfg Date: Thu Feb 11 00:34:11 2016 New Revision: 295494 URL: https://svnweb.freebsd.org/changeset/base/295494 Log: Ext4: fix handling of files with sparse blocks before extent's index. This is ongoing work from Damjan Jovanovic to improve ext4 read support with sparse files:

svn commit: r295409 - head/sys/boot/ficl

2016-02-08 Thread Pedro F. Giffuni
Author: pfg Date: Mon Feb 8 19:45:55 2016 New Revision: 295409 URL: https://svnweb.freebsd.org/changeset/base/295409 Log: ficl: Replace rand(3) with random(3). While the later is a better random generator than the former, the main reason of the change is that random() has a better

svn commit: r295410 - head/sys/boot/ficl

2016-02-08 Thread Pedro F. Giffuni
Author: pfg Date: Mon Feb 8 20:03:14 2016 New Revision: 295410 URL: https://svnweb.freebsd.org/changeset/base/295410 Log: ficl: Replace rand(3) with random(3). Be a little more consistent with random(3) and push an unsigned value. Again, this has no effect as this code doesn't get

svn commit: r295372 - head/sys/kern

2016-02-07 Thread Pedro F. Giffuni
Author: pfg Date: Sun Feb 7 16:18:12 2016 New Revision: 295372 URL: https://svnweb.freebsd.org/changeset/base/295372 Log: Minor grammar fix in comment. Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c

svn commit: r295369 - head/lib/libedit

2016-02-07 Thread Pedro F. Giffuni
Author: pfg Date: Sun Feb 7 15:26:21 2016 New Revision: 295369 URL: https://svnweb.freebsd.org/changeset/base/295369 Log: MFV r295360 Sync our libedit with NetBSD's libedit 2016-01-16 Obtained from:NetBSD Modified: head/lib/libedit/editline.3 head/lib/libedit/el.c

svn commit: r295371 - head/sys/fs/fdescfs

2016-02-07 Thread Pedro F. Giffuni
Author: pfg Date: Sun Feb 7 15:40:01 2016 New Revision: 295371 URL: https://svnweb.freebsd.org/changeset/base/295371 Log: Revert r295359: CID 1018688 is a false positive. The initialization is done by calling vn_start_write(... , flags). mp is only an output parameter unless (flags &

svn commit: r295370 - head/sys/fs/msdosfs

2016-02-07 Thread Pedro F. Giffuni
Author: pfg Date: Sun Feb 7 15:36:16 2016 New Revision: 295370 URL: https://svnweb.freebsd.org/changeset/base/295370 Log: msdosfs_rename: yet another unused value. As with r295355, it seems to be left over from a cleanup in r33548. The code is not in NetBSD either. Thanks to bde

svn commit: r295355 - head/sys/fs/msdosfs

2016-02-06 Thread Pedro F. Giffuni
Author: pfg Date: Sat Feb 6 21:54:02 2016 New Revision: 295355 URL: https://svnweb.freebsd.org/changeset/base/295355 Log: msdosfs_rename: Unused value Assigned value to pmp, is immediatedly overwritten before it can be used. CID: 1304892 Modified:

svn commit: r295359 - head/sys/fs/fdescfs

2016-02-06 Thread Pedro F. Giffuni
Author: pfg Date: Sun Feb 7 01:09:38 2016 New Revision: 295359 URL: https://svnweb.freebsd.org/changeset/base/295359 Log: fdesc_setattr: unitialized pointer read CID: 1018688 Modified: head/sys/fs/fdescfs/fdesc_vnops.c Modified: head/sys/fs/fdescfs/fdesc_vnops.c

svn commit: r295362 - head/sys/fs/cd9660

2016-02-06 Thread Pedro F. Giffuni
Author: pfg Date: Sun Feb 7 03:48:40 2016 New Revision: 295362 URL: https://svnweb.freebsd.org/changeset/base/295362 Log: cd9660: Drop an unnecessary check for NULL. This was unnecessary and also confused Coverity. Confirmed on: NetBSD CID: 978558 Modified:

svn commit: r295209 - head/sys/fs/ext2fs

2016-02-03 Thread Pedro F. Giffuni
Author: pfg Date: Wed Feb 3 14:31:23 2016 New Revision: 295209 URL: https://svnweb.freebsd.org/changeset/base/295209 Log: Revert r294695: ext2fs: passthrough any extra timestamps to the dinode struct. While it passed the classic testing, the change appears to have caused some

svn commit: r295165 - head/contrib/openresolv

2016-02-02 Thread Pedro F. Giffuni
Author: pfg Date: Tue Feb 2 21:10:43 2016 New Revision: 295165 URL: https://svnweb.freebsd.org/changeset/base/295165 Log: MFV r295109: Update openresolve to version 3.7.2 Relnotes: yes Modified: head/contrib/openresolv/Makefile head/contrib/openresolv/resolvconf.8.in

svn commit: r294695 - head/sys/fs/ext2fs

2016-01-24 Thread Pedro F. Giffuni
Author: pfg Date: Sun Jan 24 23:24:47 2016 New Revision: 294695 URL: https://svnweb.freebsd.org/changeset/base/294695 Log: ext2fs: passthrough any extra timestamps to the dinode struct. In general we don't trust any of the extended timestamps unless the EXT2F_ROCOMPAT_EXTRA_ISIZE feature

svn commit: r294652 - head/sys/fs/ext2fs

2016-01-23 Thread Pedro F. Giffuni
Author: pfg Date: Sun Jan 24 02:25:41 2016 New Revision: 294652 URL: https://svnweb.freebsd.org/changeset/base/294652 Log: ext2: Initialize i_flag after allocation. We use i_flag to carry some flags like IN_E4INDEX which newer ext2fs variants uses internally. fsck.ext3 rightfully

svn commit: r294654 - head/sys/fs/ext2fs

2016-01-23 Thread Pedro F. Giffuni
Author: pfg Date: Sun Jan 24 02:44:00 2016 New Revision: 294654 URL: https://svnweb.freebsd.org/changeset/base/294654 Log: Fix comment. Modified: head/sys/fs/ext2fs/ext2_dinode.h Modified: head/sys/fs/ext2fs/ext2_dinode.h

svn commit: r294653 - head/sys/fs/ext2fs

2016-01-23 Thread Pedro F. Giffuni
Author: pfg Date: Sun Jan 24 02:41:49 2016 New Revision: 294653 URL: https://svnweb.freebsd.org/changeset/base/294653 Log: Rename some directory index constants. Directory index was introduced in ext3. We don't always use the prefix to denote the ext2 variant they belong to but when we

svn commit: r294655 - head/sys/fs/ext2fs

2016-01-23 Thread Pedro F. Giffuni
Author: pfg Date: Sun Jan 24 04:30:30 2016 New Revision: 294655 URL: https://svnweb.freebsd.org/changeset/base/294655 Log: ext2: rename some directory index constants. Missed from r294653. Pointyhat:me Modified: head/sys/fs/ext2fs/inode.h Modified: head/sys/fs/ext2fs/inode.h

svn commit: r294504 - in head/sys: conf fs/ext2fs modules/ext2fs

2016-01-21 Thread Pedro F. Giffuni
Author: pfg Date: Thu Jan 21 14:50:28 2016 New Revision: 294504 URL: https://svnweb.freebsd.org/changeset/base/294504 Log: ext2fs: Bring back the htree dir_index implementation. The htree dir_index is perhaps one of the most characteristic features of the linux ext3 implementation. It

svn commit: r293680 - head/sys/fs/ext2fs

2016-01-11 Thread Pedro F. Giffuni
Author: pfg Date: Mon Jan 11 19:14:55 2016 New Revision: 293680 URL: https://svnweb.freebsd.org/changeset/base/293680 Log: ext4: add support for reading sparse files Add support for sparse files in ext4. Also implement read-ahead, which greatly increases the performance when transferring

svn commit: r293683 - head/sys/fs/ext2fs

2016-01-11 Thread Pedro F. Giffuni
Author: pfg Date: Mon Jan 11 19:25:43 2016 New Revision: 293683 URL: https://svnweb.freebsd.org/changeset/base/293683 Log: ext4: mount panic from freeing invalid pointers Initialize the struct with those fields to zeroes on allocation, preventing the panic. Patch by: Damjan

svn commit: r293370 - head/sys/fs/ext2fs

2016-01-07 Thread Pedro F. Giffuni
Author: pfg Date: Thu Jan 7 21:43:43 2016 New Revision: 293370 URL: https://svnweb.freebsd.org/changeset/base/293370 Log: ext2fs: reading mmaped file in Ext4 causes panic Always call brelse(path.ep_bp), fixing reading EXT4 files using mmap(). Patch by Damjan Jovanovic. PR:

svn commit: r292872 - head/sys/fs/ext2fs

2015-12-29 Thread Pedro F. Giffuni
Author: pfg Date: Tue Dec 29 15:51:52 2015 New Revision: 292872 URL: https://svnweb.freebsd.org/changeset/base/292872 Log: ext2: recognize ext4 INCOMPAT_RECOVER flag This is a flag specific for journalling in ext4. Add it to the list of ext4 features we ignore for read-only purposes.

svn commit: r292877 - head/bin/pax

2015-12-29 Thread Pedro F. Giffuni
Author: pfg Date: Tue Dec 29 16:31:28 2015 New Revision: 292877 URL: https://svnweb.freebsd.org/changeset/base/292877 Log: pax: prevent possible buffer overflow Or at least quiet down some static analyzers about it. CID: 978835 MFC after:1 week Obtained from:OpenBSD

svn commit: r292605 - head/usr.sbin/cron/cron

2015-12-22 Thread Pedro F. Giffuni
Author: pfg Date: Tue Dec 22 15:20:08 2015 New Revision: 292605 URL: https://svnweb.freebsd.org/changeset/base/292605 Log: crontab: replace malloc + bzero with calloc Obtained from:OpenBSD (Rev 1.20) Modified: head/usr.sbin/cron/cron/popen.c Modified:

svn commit: r292606 - head/usr.sbin/cron/crontab

2015-12-22 Thread Pedro F. Giffuni
Author: pfg Date: Tue Dec 22 15:30:26 2015 New Revision: 292606 URL: https://svnweb.freebsd.org/changeset/base/292606 Log: crontab: properly free an entry This should close memory leak. Obtained from:OpenBSD (rev. 1.62) CID: 271773 Modified:

svn commit: r292607 - head/usr.sbin/cron/cron

2015-12-22 Thread Pedro F. Giffuni
Author: pfg Date: Tue Dec 22 15:32:45 2015 New Revision: 292607 URL: https://svnweb.freebsd.org/changeset/base/292607 Log: cron: Check the return value of pipe(2) Fix inspired by: OpenBSD (rev 1.56) CID: 1009830 Modified: head/usr.sbin/cron/cron/do_command.c Modified:

svn commit: r292608 - head/usr.sbin/cron/cron

2015-12-22 Thread Pedro F. Giffuni
Author: pfg Date: Tue Dec 22 15:42:53 2015 New Revision: 292608 URL: https://svnweb.freebsd.org/changeset/base/292608 Log: Undo change from r292607 that was not meant to be there Pointyhat: me Modified: head/usr.sbin/cron/cron/do_command.c Modified: head/usr.sbin/cron/cron/do_command.c

svn commit: r292455 - head/bin/ed

2015-12-18 Thread Pedro F. Giffuni
Author: pfg Date: Fri Dec 18 23:05:36 2015 New Revision: 292455 URL: https://svnweb.freebsd.org/changeset/base/292455 Log: ed(1): Prevent possible string overflows Use strlcpy instead of strncpy to guarantee NULL termination. Pointed out by: imp CID: 1007252 X-MFC

svn commit: r292454 - head/bin/ed

2015-12-18 Thread Pedro F. Giffuni
Author: pfg Date: Fri Dec 18 21:58:42 2015 New Revision: 292454 URL: https://svnweb.freebsd.org/changeset/base/292454 Log: ed(1): Prevent possible string overflows CID: 1007252 MFC after:2 weeks Modified: head/bin/ed/main.c Modified: head/bin/ed/main.c

svn commit: r291234 - head/usr.bin/bc

2015-11-23 Thread Pedro F. Giffuni
Author: pfg Date: Tue Nov 24 04:15:13 2015 New Revision: 291234 URL: https://svnweb.freebsd.org/changeset/base/291234 Log: bc(1): Fix memory corruption issues Fix crashes and hangs found by AFL. Improve handling of non-ascii chars. Obtained from:OpenBSD (CVS rev 1.49)

svn commit: r291155 - head/usr.bin/bc

2015-11-21 Thread Pedro F. Giffuni
Author: pfg Date: Sun Nov 22 02:43:14 2015 New Revision: 291155 URL: https://svnweb.freebsd.org/changeset/base/291155 Log: bc: sync with OpenBSD tty.c Rev. 1.3 Avoid unintended problems with operator precedence when doing an assignment and comparison. bc.1, Rev. 1.31, 1.32 '.Ql

svn commit: r290394 - in head: include sys/sys

2015-11-05 Thread Pedro F. Giffuni
Author: pfg Date: Thu Nov 5 14:55:58 2015 New Revision: 290394 URL: https://svnweb.freebsd.org/changeset/base/290394 Log: Rename __sentinel to __null_sentinel GCC 5 uses a conflicting __sentinel definition in include/c++/bits/stl_algo.h Reported by: matteo Modified:

svn commit: r289150 - head/contrib/gcc/cp

2015-10-11 Thread Pedro F. Giffuni
Author: pfg Date: Sun Oct 11 19:58:57 2015 New Revision: 289150 URL: https://svnweb.freebsd.org/changeset/base/289150 Log: Correct handling of enum attributes with g++ From OpenBSD's commit log: This was responsible for memory corruption with recent versions of Mesa where c and c++

svn commit: r289160 - head/contrib/gcc/cp

2015-10-11 Thread Pedro F. Giffuni
Author: pfg Date: Mon Oct 12 02:05:25 2015 New Revision: 289160 URL: https://svnweb.freebsd.org/changeset/base/289160 Log: Revertr289150: Correct handling of enum attributes with g++ It is causing issues on some platforms. Reported by: sbruno (through adrian) Modified:

svn commit: r288669 - head/share/mk

2015-10-04 Thread Pedro F. Giffuni
Author: pfg Date: Sun Oct 4 18:54:02 2015 New Revision: 288669 URL: https://svnweb.freebsd.org/changeset/base/288669 Log: Bump the stack protector to level "strong". The general stack protector is known to be weak and has pretty small coverage. While setting stack-protector-all would

svn commit: r287254 - head/sys/sys

2015-08-28 Thread Pedro F. Giffuni
Author: pfg Date: Fri Aug 28 14:06:28 2015 New Revision: 287254 URL: https://svnweb.freebsd.org/changeset/base/287254 Log: Be more GCC-friendly with attributes Being clang the default compiler, we were always giving precedence to the __has_attribute check. Unfortunately clang generally

svn commit: r287255 - head/sys/sys

2015-08-28 Thread Pedro F. Giffuni
Author: pfg Date: Fri Aug 28 14:13:01 2015 New Revision: 287255 URL: https://svnweb.freebsd.org/changeset/base/287255 Log: trailing space Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h == ---

svn commit: r287259 - head/sys/sys

2015-08-28 Thread Pedro F. Giffuni
Author: pfg Date: Fri Aug 28 15:36:05 2015 New Revision: 287259 URL: https://svnweb.freebsd.org/changeset/base/287259 Log: Add underscores to attributes when checking for __has_attribute. This is a good practice to avoid confusion with allowed macros. Suggested by: jilles Modified:

svn commit: r286972 - head/contrib/hyperv/tools

2015-08-20 Thread Pedro F. Giffuni
Author: pfg Date: Thu Aug 20 21:49:59 2015 New Revision: 286972 URL: https://svnweb.freebsd.org/changeset/base/286972 Log: Appease gcc-4.2 It needs to die, but it resists mipsteriously. Submitted by: Oliver Pinter Modified: head/contrib/hyperv/tools/hv_kvp_daemon.c Modified:

svn commit: r286891 - head/usr.bin/calendar/calendars

2015-08-18 Thread Pedro F. Giffuni
Author: pfg Date: Tue Aug 18 15:11:41 2015 New Revision: 286891 URL: https://svnweb.freebsd.org/changeset/base/286891 Log: Calendar: add a few more dates to the Christian calendar The many christian denominations have different dates for their celebrations and controversies are likely to

svn commit: r286893 - head/usr.bin/calendar/calendars

2015-08-18 Thread Pedro F. Giffuni
Author: pfg Date: Tue Aug 18 15:50:02 2015 New Revision: 286893 URL: https://svnweb.freebsd.org/changeset/base/286893 Log: Correct All Saints' day. Thanks to:zec X-MFC with: r286891 Modified: head/usr.bin/calendar/calendars/calendar.christian Modified:

svn commit: r286782 - in head/lib/libc: secure sys

2015-08-14 Thread Pedro F. Giffuni
Author: pfg Date: Fri Aug 14 14:58:04 2015 New Revision: 286782 URL: https://svnweb.freebsd.org/changeset/base/286782 Log: Remove a stale comment and clarify the original where it was taken from The comment in the libc/sys symbol map referenced the generated symbols for the syscall

svn commit: r286760 - in head/lib/libc: . secure sys

2015-08-13 Thread Pedro F. Giffuni
Author: pfg Date: Fri Aug 14 03:03:13 2015 New Revision: 286760 URL: https://svnweb.freebsd.org/changeset/base/286760 Log: Move the stack protector to a new secure directory As part of the code refactoring to support FORTIFY_SOURCE we want a new subdirectory secure to keep the files

svn commit: r286615 - in head: sys/arm/ti sys/arm64/arm64 sys/geom/raid usr.bin/wc

2015-08-10 Thread Pedro F. Giffuni
Author: pfg Date: Tue Aug 11 03:12:09 2015 New Revision: 286615 URL: https://svnweb.freebsd.org/changeset/base/286615 Log: Clean out some externally visible more then grammar MFC after:3 days Modified: head/sys/arm/ti/ti_hwmods.c head/sys/arm64/arm64/trap.c

svn commit: r286614 - in head/usr.bin/xlint: lint1 lint2

2015-08-10 Thread Pedro F. Giffuni
Author: pfg Date: Tue Aug 11 02:58:33 2015 New Revision: 286614 URL: https://svnweb.freebsd.org/changeset/base/286614 Log: xlint(1): Fix some typos in comments and translate some german No functional change. Obtained from:OpenBSD (where xlint is no more) Modified:

svn commit: r286531 - head/sys/sys

2015-08-09 Thread Pedro F. Giffuni
Author: pfg Date: Sun Aug 9 15:38:32 2015 New Revision: 286531 URL: https://svnweb.freebsd.org/changeset/base/286531 Log: cdefs: reduce code duplication Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h

svn commit: r286268 - head/usr.bin/wall

2015-08-03 Thread Pedro F. Giffuni
Author: pfg Date: Tue Aug 4 02:56:31 2015 New Revision: 286268 URL: https://svnweb.freebsd.org/changeset/base/286268 Log: Revert r286144 leaving the original fix to the buffer overflow. Some developers consider the new code unnecessarily obfuscated. There was also a benign off-by-one.

svn commit: r286144 - head/usr.bin/wall

2015-07-31 Thread Pedro F. Giffuni
Author: pfg Date: Sat Aug 1 01:29:55 2015 New Revision: 286144 URL: https://svnweb.freebsd.org/changeset/base/286144 Log: Buffer overflow in wall(1). Revert r286102 and apply a cleaner fix. Tested for overflows by FORTIFY_SOURCE GSoC (with clang). Suggested by: bde Reviewed by:

svn commit: r286074 - in head/contrib/gcc: . doc

2015-07-30 Thread Pedro F. Giffuni
Author: pfg Date: Thu Jul 30 14:31:09 2015 New Revision: 286074 URL: https://svnweb.freebsd.org/changeset/base/286074 Log: GCC: Add a new option -fstack-protector-strong This includes additional functions to be protected: those that have local array definitions, or have references to

svn commit: r286102 - head/usr.bin/wall

2015-07-30 Thread Pedro F. Giffuni
Author: pfg Date: Fri Jul 31 01:12:31 2015 New Revision: 286102 URL: https://svnweb.freebsd.org/changeset/base/286102 Log: Buffer overflow in wall(1). This affected syslogd, wall and talkd. Detected by FORTIFY_SOURCE GSoC (with clang). Submitted by: Oliver Pinter Differential

svn commit: r285884 - in head: lib/libiconv_modules/BIG5 lib/libiconv_modules/EUC lib/libiconv_modules/EUCTW lib/libiconv_modules/UTF1632 lib/libiconv_modules/UTF7 lib/libiconv_modules/iconv_std us...

2015-07-25 Thread Pedro F. Giffuni
Author: pfg Date: Sun Jul 26 00:11:04 2015 New Revision: 285884 URL: https://svnweb.freebsd.org/changeset/base/285884 Log: Bump GCC max-inline-insns-single in libiconv_modules and grep This is required by our FORTIFY_SOURCE implementation as it does more inlining. As a rule of thumb,

svn commit: r285719 - head/usr.sbin/bsnmpd/modules/snmp_hostres

2015-07-20 Thread Pedro F. Giffuni
Author: pfg Date: Mon Jul 20 16:08:01 2015 New Revision: 285719 URL: https://svnweb.freebsd.org/changeset/base/285719 Log: snmp_hostres(3): Fix buffer overflow. Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches. CID: 1007594 MFC after:3 days Modified:

svn commit: r285720 - head/lib/libusb

2015-07-20 Thread Pedro F. Giffuni
Author: pfg Date: Mon Jul 20 16:15:56 2015 New Revision: 285720 URL: https://svnweb.freebsd.org/changeset/base/285720 Log: libusb: Fix minor cast-qual warning. Fix a warning triggered by the gcc + FORTIFY_SOURCE patches: In function 'libusb20_parse_config_desc':

svn commit: r285644 - head/contrib/sqlite3

2015-07-16 Thread Pedro F. Giffuni
Author: pfg Date: Thu Jul 16 22:07:13 2015 New Revision: 285644 URL: https://svnweb.freebsd.org/changeset/base/285644 Log: sqlite: clean a couple of invocations of memcpy(3) Found almost accidentally by our native gcc when enhanced with FORTIFY_SOURCE. Submitted by: Oliver Pinter

svn commit: r285277 - head/include

2015-07-08 Thread Pedro F. Giffuni
Author: pfg Date: Wed Jul 8 16:21:10 2015 New Revision: 285277 URL: https://svnweb.freebsd.org/changeset/base/285277 Log: Use the __sentinel attribute. Start using the gcc sentinel attribute, which can be used to mark varargs function that need a NULL pointer to mark argument

svn commit: r285278 - head/lib/libthr/thread

2015-07-08 Thread Pedro F. Giffuni
Author: pfg Date: Wed Jul 8 16:35:24 2015 New Revision: 285278 URL: https://svnweb.freebsd.org/changeset/base/285278 Log: cosmetic: whitespaces-tab before EOL Obtained from:cpi-llvm project Modified: head/lib/libthr/thread/thr_create.c Modified:

svn commit: r284913 - head/usr.sbin/dconschat

2015-06-28 Thread Pedro F. Giffuni
Author: pfg Date: Sun Jun 28 20:32:03 2015 New Revision: 284913 URL: https://svnweb.freebsd.org/changeset/base/284913 Log: dconschat(8): Use NULL instead of 0 for the last argument in execl(3) Found while experimenting with the gcc sentinel attribute. MFC after:3 days Modified:

svn commit: r284917 - head/sys/sys

2015-06-28 Thread Pedro F. Giffuni
Author: pfg Date: Mon Jun 29 00:30:30 2015 New Revision: 284917 URL: https://svnweb.freebsd.org/changeset/base/284917 Log: Add a new __sentinel attribute. The sentinel attribute was originally implemented in OpenBSD's gcc and later adopted by upstream GCC 4.0 (and clang). From the

svn commit: r284890 - head/sys/sys

2015-06-27 Thread Pedro F. Giffuni
Author: pfg Date: Sat Jun 27 15:13:14 2015 New Revision: 284890 URL: https://svnweb.freebsd.org/changeset/base/284890 Log: Change detection for the gnu_inline attribute. According to the GCC documentation: This attribute is available in GCC 4.1.3 and later. It is available if either of

svn commit: r284462 - head/sys/kern

2015-06-16 Thread Pedro F. Giffuni
Author: pfg Date: Tue Jun 16 20:19:00 2015 New Revision: 284462 URL: https://svnweb.freebsd.org/changeset/base/284462 Log: Use nitems() macro instead of __arraycount() Modified: head/sys/kern/stack_protector.c Modified: head/sys/kern/stack_protector.c

svn commit: r283669 - head/sys/fs/ext2fs

2015-05-28 Thread Pedro F. Giffuni
Author: pfg Date: Thu May 28 21:06:59 2015 New Revision: 283669 URL: https://svnweb.freebsd.org/changeset/base/283669 Log: Provide VOP_GETPAGES_ASYNC() for extfs. Merge the filesystem specific part from r274914 to ext2fs. I only did regular testing with the change but UFS and our

svn commit: r283315 - head/sys/ddb

2015-05-23 Thread Pedro F. Giffuni
Author: pfg Date: Sat May 23 14:59:27 2015 New Revision: 283315 URL: https://svnweb.freebsd.org/changeset/base/283315 Log: ddb: de-register Modified: head/sys/ddb/db_command.c head/sys/ddb/db_input.c head/sys/ddb/db_run.c head/sys/ddb/db_watch.c head/sys/ddb/db_write_cmd.c

svn commit: r283296 - head/sys/ddb

2015-05-22 Thread Pedro F. Giffuni
Author: pfg Date: Fri May 22 19:04:06 2015 New Revision: 283296 URL: https://svnweb.freebsd.org/changeset/base/283296 Log: ddb: Use NULL for pointers Hinted by:DragonflyBSD Modified: head/sys/ddb/db_command.c Modified: head/sys/ddb/db_command.c

svn commit: r283248 - in head/sys: amd64/amd64 arm/arm arm64/arm64 ddb i386/i386 kern mips/mips powerpc/powerpc sparc64/sparc64

2015-05-21 Thread Pedro F. Giffuni
Author: pfg Date: Thu May 21 15:16:18 2015 New Revision: 283248 URL: https://svnweb.freebsd.org/changeset/base/283248 Log: ddb: finish converting boolean values. The replacement started at r283088 was necessarily incomplete without replacing boolean_t with bool. This also involved

svn commit: r283068 - head/lib/libc/db/hash

2015-05-18 Thread Pedro F. Giffuni
Author: pfg Date: Mon May 18 16:28:13 2015 New Revision: 283068 URL: https://svnweb.freebsd.org/changeset/base/283068 Log: Drop some unnecessary casts. Reported by: Clang static analyzer Obtained from:NetBSD Modified: head/lib/libc/db/hash/hash.c Modified:

<    3   4   5   6   7   8   9   10   11   12   >