Baptiste Daroussin
ede89d5db2
Add O_CLOEXEC to flopen
...
Requested by: jilles
2012-12-27 20:24:44 +00:00
Baptiste Daroussin
b3075010f8
Simplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil.
2012-12-27 19:43:29 +00:00
Baptiste Daroussin
1067c64a19
gr_dup: simplify duplication of group
...
Submitted by: db
2012-12-27 19:33:43 +00:00
Baptiste Daroussin
2bfeb4fe75
- Clean up previous gr_add use malloc instead of calloc
...
- Fix tinderbox error
Submitted by: db
2012-12-27 16:51:29 +00:00
Baptiste Daroussin
0c50344969
Fix a regression in "pw group show" introduced r242349:
...
print a newline after printing each group line.
PR: bin/174731
Submitted by: Jan Beich <jbeich@tormail.org>
2012-12-27 14:44:13 +00:00
Baptiste Daroussin
460a6dac0b
Simplify the code by using the new gr_add function
2012-12-27 14:35:06 +00:00
Baptiste Daroussin
be49c83011
New gr_add function to provide a clean and safe method to append a new member
...
into an existing group.
Submitted by: db
2012-12-27 14:30:19 +00:00
Baptiste Daroussin
98e79fb122
Use flopen(3) instead of open(2) + flock(2)
2012-12-27 14:09:50 +00:00
Jilles Tjoelker
a68c6b5790
test(1): Document == alias for =.
...
Reviewed by: gjb
Requested by: gjb
MFC after: 1 week
2012-12-27 13:21:37 +00:00
Attilio Rao
ad9505aae7
Remove an unused var.
...
Sponsored by: EMC / Isilon storage division
MFC after: 3 days
2012-12-27 12:53:46 +00:00
Attilio Rao
30c7dd147c
br_prod_tail and br_cons_tail members are used as barrier to
...
signal bug_ring ownership. However, instructions can be reordered
around members write leading to stale values for ie. br_prod_bufs.
Use correct memory barriers to ensure proper ordering of the
ownership tokens updates.
Sponsored by: EMC / Isilon storage division
MFC after: 2 weeks
2012-12-27 12:36:58 +00:00
Luigi Rizzo
9aff36d897
use nanosecond resolution, make sure gettimeofday
...
is called at most every 100 packets.
2012-12-27 09:15:21 +00:00
Michael Tuexen
11e03b3200
Some cleanups.
...
MFC after: 3 days
2012-12-27 08:10:58 +00:00
Michael Tuexen
72c123a8b4
Minor cleanups of debug messages.
...
MFC after: 3 days
2012-12-27 08:06:58 +00:00
Michael Tuexen
2c2e3218cb
Fix a copy and paste error.
...
MFC after: 3 days
2012-12-27 08:02:58 +00:00
Devin Teske
d1bb7cca77
Comments and fit to 80-columns.
2012-12-27 07:52:50 +00:00
Baptiste Daroussin
ae61f4dda6
Simplify copying of group members by using memcpy
...
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
2012-12-26 23:16:24 +00:00
Baptiste Daroussin
c195c1ba19
Fix off-by-one error in memory allocation: j entries, one new and a null
...
terminator is j + 2.
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
2012-12-26 23:14:33 +00:00
Mark Johnston
7716eb4c40
Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they
...
typically do not handle the SYNCHRONIZE_CACHE command - they either
return an error or the firmware enters a reset loop.
Reviewed by: hselasky
Approved by: rstone (co-mentor)
MFC after: 2 weeks
2012-12-26 22:21:27 +00:00
Pawel Jakub Dawidek
6011443800
Reset provider-specific fields when resending I/O request in low memory
...
conditions. This fixes assertion which checks those fields when kernel is
compiled with DIAGNOSTIC.
Reported by: kib, pho
MFC after: 1 week
2012-12-26 20:07:47 +00:00
Raphael Kubo da Costa
b42a2049f1
Use DEVMETHOD_END, as suggested by hselasky@.
...
Approved by: glebius
2012-12-26 19:14:21 +00:00
Raphael Kubo da Costa
ac76cdc670
Use the correct USB interface macros instead of USB_IF_CSI.
...
As pointed out by hselasky@, USB_IF_CSI is the wrong macro here since we want
to declare the device's interface class, subclass and protocol, not class,
subclass and driver info.
Follow-up to r244704.
PR: kern/174707
Approved by: glebius
MFC after: 1 week
2012-12-26 19:12:31 +00:00
Baptiste Daroussin
0083d61abc
In case of the deletion of a user those whole database has to be regenerated,
...
otherwise the user planned to be deleted remain in the pwd.db while removed from
the plain text password file.
2012-12-26 18:28:17 +00:00
Baptiste Daroussin
dc0f2b4217
Fix creating a user and adding it to a group
...
Reported by: "Sam Fourman Jr." <sfourman@gmail.com>, dim
2012-12-26 18:14:45 +00:00
Attilio Rao
c92c859b7b
Fixup r244240: mp_ncpus will be 1 also in the !SMP and smp_disabled=1
...
case. There is no point in optimizing further the code and use a TRUE
litteral for a path that does heavyweight stuff anyway (like lock acq),
at the price of obfuscated code.
Use the appropriate check where necessary and remove a macro.
Sponsored by: EMC / Isilon storage division
MFC after: 3 days
2012-12-26 15:20:32 +00:00
Gleb Smirnoff
70a0e3403a
Add vendor IDs for Broadcom USB dongles (BCM20702).
...
PR: kern/174707
Submitted by: rakuco
2012-12-26 15:10:20 +00:00
David Xu
fee3029ce7
Always initialize pattern_buf pointers to NULL, otherwise AMD64 machine
...
panics with:
free: address xxx(yyy) has not been allocated.
it can be triggered by hald.
2012-12-26 13:07:17 +00:00
Sergey Kandaurov
322f22f7b5
Fix libproc test case to work with clang premature optimization
...
observed with -O2 (used by default).
Avoid function inlining for t1_bkpt_t on which we set a breakpoint.
Otherwise the address of the function is never called thus the
breakpoint never triggers.
Reported by: zont
Reviewed by: rpaulo
2012-12-26 05:11:48 +00:00
Rick Macklem
659cf796d3
Attempt to clarify that for ZFS, all file systems under
...
the NFSv4 root must be exported. This is because ZFS
checks exports itself.
This is a content change.
MFC after: 2 weeks
2012-12-25 22:47:49 +00:00
Rick Macklem
211024e9b6
Attempt to clarify that for ZFS, all file systems under
...
the NFSv4 root must be exported. This is because ZFS
checks exports itself.
This is a content change.
MFC after: 2 weeks
2012-12-25 22:34:43 +00:00
Antoine Brodin
3496d72c48
Use correct size in snprintf.
...
Remove unused buffer.
PR: 174631
Submitted by: Henning Petersen
MFC after: 1 month
2012-12-25 17:06:05 +00:00
Gleb Smirnoff
c4d0697685
Garbage collect carp_cksum().
2012-12-25 14:29:38 +00:00
Jilles Tjoelker
cdbd40cbb2
sh: Prefer strsignal() to accessing sys_siglist directly.
...
Accessing sys_siglist directly requires rtld to copy it from libc to the sh
executable's BSS. Also, strsignal() will put in the signal number for
unknown signals (FreeBSD-specific) so we need not do that ourselves.
Unfortunately, there is no function for sys_signame.
2012-12-25 14:17:09 +00:00
Gleb Smirnoff
7951008b47
Change net.inet.carp.demotion sysctl to add the supplied value
...
to the current demotion factor instead of assigning it.
This allows external scripts to control demotion factor together
with kernel in a raceless manner.
2012-12-25 14:08:13 +00:00
Gleb Smirnoff
e8db9937f3
Fix sysctl_handle_int() usage. Either arg1 or arg2 should be supplied,
...
and arg2 doesn't pass size of arg1.
2012-12-25 13:55:21 +00:00
Andrey Zonov
bde505592f
- Update manual pages accordingly to r244384 and r244385.
...
Approved by: kib (mentor)
MFC after: 1 week
2012-12-25 13:43:01 +00:00
Gleb Smirnoff
468e45f3bd
The SIOCSIFFLAGS ioctl handler runs if_up()/if_down() that notify
...
all interested parties in case if interface flag IFF_UP has changed.
However, not only SIOCSIFFLAGS can raise the flag, but SIOCAIFADDR
and SIOCAIFADDR_IN6 can, too. The actual |= is done not in the protocol
code, but in code of interface drivers. To fix this historical layering
violation, we will check whether ifp->if_ioctl(SIOCSIFADDR) raised the
IFF_UP flag, and if it did, run the if_up() handler.
This fixes configuring an address under CARP control on an interface
that was initially !IFF_UP.
P.S. I intentionally omitted handling the IFF_SMART flag. This flag was
never ever used in any driver since it was introduced, and since it
means another layering violation, it should be garbage collected instead
of pretended to be supported.
2012-12-25 13:01:58 +00:00
Devin Teske
56961fd794
Add more debugging to help with diagnosis of program-flow when needed.
2012-12-25 10:47:45 +00:00
Devin Teske
12f110aa1a
Remove unnecessary duplicate initialization of the dialog(1) API (automatically
...
bootstrapped on-include unless DIALOG_SELF_INITIALIZE is set to NO before-hand)
2012-12-25 09:30:25 +00:00
Andrew Turner
b8d52352a7
Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t.
...
* The __glibcxx_max macro came from GCC svn r138078, the last GPLv2
revision of this file.
* I wrote the updated __glibcxx_min macro.
2012-12-25 07:37:33 +00:00
Luigi Rizzo
f7a1732204
various connections to last commit
2012-12-25 07:29:25 +00:00
Gleb Smirnoff
3e6c8b5366
Minor style(9) changes:
...
- Remove declaration in initializer.
- Add empty line between logical blocks.
2012-12-24 21:35:48 +00:00
Hans Petter Selasky
607bbcba30
Fix more regression issue after r244503.
...
usbd_transfer_setup() does not set a default length for USB transfers.
Only the number of frames is automatically setup.
MFC after: 1 week
2012-12-24 10:10:18 +00:00
Luigi Rizzo
6750270f23
small cleanup of the code, and add support for running multiple
...
threads on each socket.
2012-12-23 23:03:45 +00:00
Konstantin Belousov
ad9789f6db
Do not force a writer to the devfs file to drain the buffer writes.
...
Requested and tested by: Ian Lepore <freebsd@damnhippie.dyndns.org>
MFC after: 2 weeks
2012-12-23 22:43:27 +00:00
Luigi Rizzo
6be79c7b99
enable building picobsd with CC instead of CLANG
2012-12-23 22:41:54 +00:00
Andrew Turner
0d526975ee
Pull in r170096 from upstream clang trunk:
...
Initial support for FreeBSD on ARM.
2012-12-23 21:41:39 +00:00
Matthew Seaman
e41b8acbd5
Remove extraneous space and new-line.
...
Submitted by: pjd, gcooper
Approved by: bapt
MFC after: 2 weeks
2012-12-23 20:39:03 +00:00
Rick Macklem
7dbcc85c6b
Fix the Makefile so it can build gssd.c after r244604.
...
MFC after: 2 weeks
2012-12-23 20:12:57 +00:00
Andriy Gapon
f71fbb1d12
zfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used instead
...
To do: remove KM_ZERO declaration
Pointyhat to: avg (for mindlessly using the pseudo-flag)
MFC after: instantly (to fix stable/8 build)
2012-12-23 19:58:41 +00:00