summaryrefslogtreecommitdiffstats
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* Remove sicontrol(8)'s "ttystat".ed2008-06-092-67/+1
| | | | | | | | | | | | | | | | | In the FreeBSD base system, there are only two utilities that use struct tty, namely pstat and sicontrol. The sicontrol utility calls the TCSI_TTY ioctl(), which copies struct tty back to userspace. sicontrol should not have this functionality. The same data is already provided by pstat. If we really want to be able to export these numbers through a file descriptor to userspace, we can export struct xtty, which should provide a better abstraction. The ttystat option was only used as a debugging aid. This makes sicontrol compile in the mpsafetty branch. Reviewed by: peter Approved by: philip (mentor)
* Change the CTF conversion makefile code to use a new line to avoidjb2008-06-091-1/+1
| | | | | | | | spawning another shell. Requested by: Ed Schouten M config/mkmakefile.c
* Add more card state dump routines. Decode more bitfields etc.peter2008-06-062-38/+255
|
* Make ppp use <termios.h>, not <sys/tty.h>.ed2008-06-051-1/+1
| | | | | | | | ppp's physical.c is filled with calls to termios. For some reason, it includes <sys/tty.h>, not <termios.h>. Even though this works with the current version of FreeBSD, we'd better follow the standards. Approved by: philip (mentor)
* Add a newline after usage.mlaier2008-06-041-1/+1
|
* - Replace rcsid with __FBSDID.jkim2008-06-032-241/+261
| | | | | | - Remove paths.h and embed it in the source. - Remove stale alpha support. - Clean up compiler warnings and fix style(9) bugs.
* Exclude .svn directories from generated distfile.flz2008-06-031-1/+2
|
* Fix a crash when Arctic Ocean is selected.jkim2008-06-021-3/+2
| | | | MFC after: 1 week
* Add a missing call to init_nsm().dfr2008-06-021-0/+1
| | | | MFC after: 1 week
* getopt returns an int, not a char. Make sure that we store theimp2008-06-021-1/+1
| | | | | | | | | | variable in an int to avoid casting to an unsigned value which causes the comparison with -1 to fail. PR: 123807 Submitted by: Matthew Luckie Reviewed by: keramida@ MFC after: 1 week
* Use INSERT_OBJECT_INT_LINK_INDEX macro instead of TAILQ_INSERT_TAIL whenphilip2008-06-011-1/+1
| | | | | | | | | | | filling the table of ALTQ queues retrieved from the kernel. It is possible for the kernel to return the queues not by pa.altq.qid order. When this happens, pf_snmp would only partially fill its table. PR: bin/120974 Submitted by: Mykola Dzham <i -at- levsha.org.ua> MFC after: 3 days
* Remove one of my dead email addresses from a copyright message.peter2008-05-311-1/+1
|
* - Add long options to pkg_install.flz2008-05-3013-100/+206
| | | | | - Remove check for '-?' as it's not listed in authorized options. - Bump PKG_INSTALL_VERSION to 20080530.
* Fix some bugs/complaints:mr2008-05-292-22/+31
| | | | | | | | | - make addr2jid static - add -h Flag for hostname/ip-number search - s,strncmp,strcmp, in addr2jid - return jid only if found once Requested by: some
* misc cleanups for stricter compilationsam2008-05-281-14/+4
|
* update copyright year and nuke dual-gpl bits that should've removed long agosam2008-05-281-8/+1
|
* Use PKG_INSTALL_VERSION for the distfile name instead of current date.flz2008-05-281-1/+1
| | | | X-MFC after: pkg_install sync on -STABLE branches
* Bump PKG_INSTALL_VERSION to 20080528.flz2008-05-281-1/+1
| | | | X-MFC after: latest HEAD changes have been MFC'ed to RELENG_[67]
* Update usage strings to add a missing -n option.keramida2008-05-271-1/+1
| | | | Noticed by: Matthias Apitz, matthias.apitz at oclc.org
* - Increase the size of the salt in pw(8) from 8 to 32 (same as in pam_unix(8)).antoine2008-05-271-5/+7
| | | | | | | | | | | This makes blowfish password hashes look normal when set using pw(8)/adduser(8). [1] - Make it possible to have a '/' in the salt. PR: 121146 [1] Submitted by: Jaakko Heinonen [1] Approved by: rwatson (mentor) MFC after: 1 month
* Add a -n option to pkg_create(1), to inhibit duplicate work.keramida2008-05-274-5/+42
| | | | | | | | | | | | | | | | | | | | When run without this option, multiple runs of `pkg_create -Rb' will recreate common packages multiple times. This can take a lot of time for large packages. With the -n option `pkg_create -b' checks with stat(2) and skips packages that already exist. Note that this may *not* be safe of the existing output file is not really a package, or if it has been corrupted, modified or otherwise tinkered with between subsequent pkg_create runs. For this and POLA reasons, the default behavior is to *rebuild* the packages, and the -n option can be used when we know it is `safe' to run in no-regenerate mode. Inspired by: A post to freebsd-questions by Matthias Apitz &lt; matthias.apitz at oclc.org &gt; Reviewed by: marcus, flz Approved by: marcus MFC after: 2 weeks
* Add jme(4) to the list of supported network interface.yongari2008-05-271-0/+1
|
* Add CAUTIONS section to the manpage and update .Dd.mr2008-05-262-2/+6
| | | | | | | | Spelling fix. PR: bin/119305 (reminded by Frank Behrens) Suggested by: rwatson, maxim MFC after: 2 weeks
* Extend jexec to accept hostname or ip-number besides jail-id.mr2008-05-262-4/+60
| | | | MFC after: 2 weeks
* Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE andbz2008-05-26120-37947/+4
| | | | | | | | | | | | | | | | | | parts relied on the now removed NET_NEEDS_GIANT. Most of I4B has been disconnected from the build since July 2007 in HEAD/RELENG_7. This is what was removed: - configuration in /etc/isdn - examples - man pages - kernel configuration - sys/i4b (drivers, layers, include files) - user space tools - i4b support from ppp - further documentation Discussed with: rwatson, re
* Remove netatm from HEAD as it is not MPSAFE and relies on the now removedrwatson2008-05-2532-17111/+0
| | | | | | | | | | | | | | | | | | | NET_NEEDS_GIANT. netatm has been disconnected from the build for ten months in HEAD/RELENG_7. Specifics: - netatm include files - netatm command line management tools - libatm - ATM parts in rescue and sysinstall - sample configuration files and documents - kernel support as a module or in NOTES - netgraph wrapper nodes for netatm - ctags data for netatm. - netatm-specific device drivers. MFC after: 3 weeks Reviewed by: bz Discussed with: bms, bz, harti
* Move sysinstall/sade away from TIOCGSIZE.ed2008-05-232-8/+8
| | | | | | | | | Both sysinstall and sade still seem to use the TIOCGSIZE ioctl to obtain the terminal dimensions. We'd better use TIOCGWINSZ to do this. The TIOCGWINSZ interface is preferred, because it also allows sizes in pixels to be passed to the application (though this is not used here). Approved by: philip (mentor)
* Add the CTF conversion to the generated makefile. In the case wherejb2008-05-231-1/+1
| | | | NO_CTF or !WITH_CTF, the macro is empty.
* -d is a flag, not an argument. Use .Fl here.thompsa2008-05-201-1/+1
|
* Update to reflect reality:rpaulo2008-05-201-3/+8
| | | | | | | * iasl(8) supports ACPI 3.0b. * Add new options. MFC after: 1 week
* Remove -, .Ar adds that automatically.thompsa2008-05-191-1/+1
| | | | Pointed out by: brueffer
* Bump document date for last change.thompsa2008-05-191-1/+1
|
* Allow wlandebug to set the default debug level which is inherited when vaps arethompsa2008-05-192-6/+20
| | | | created.
* Add age(4) to the list of supported network interface.yongari2008-05-191-0/+1
|
* Add support for specifying which INDEX files to build via portsnap.conf.cperciva2008-05-171-4/+16
| | | | | Requested by: brooks Reminded by: brooks, about halfway through his BSDCan talk
* Improve the virtual scrolling mechanism to make middle clicking lessphilip2008-05-152-15/+58
| | | | | | | | | | | difficult. Add a -L option (yet another option, indeed!) which changes the speed of scrolling and change -U to only affect the scroll threshold. This should make middle-clicking a much more pleasant experience. PR: bin/120186 Submitted by: Aragon Gouveia <aragon -at- phat.za.net> MFC after: 3 days
* Populate usage()phk2008-05-143-12/+30
| | | | Submitted by: Jaakko Heinonen <jh@saunalahti.fi>
* Fix pstat behaviour when using coredumps. The reference to tp wasremko2008-05-141-1/+1
| | | | | | | | | | incorrect and should have been poining to &tty, tp is a virtual address from the coredump, while we should obtain the address through the tty struct. Approved by: imp (mentor, implicit trivial changes) MFC after: 1 week Submitted by: Ed Schouten (ed at 80836 dot nl)
* Add a -8 switch to syslogd to prevent it from mangling 8-bit data.brian2008-05-142-5/+26
|
* Better to just statically set the name vs. determine at run time.obrien2008-05-1112-12/+16
|
* Sync program name agnostic changes with SADE.obrien2008-05-114-8/+10
|
* Clean up several instances of SADE calling itself sysinstall.obrien2008-05-115-10/+12
| | | | (do so generically so the same set of changes can be applied to sysinstall)
* Change two variables to size_t to improve portability.julian2008-05-101-1/+1
| | | | Submitted by: Xin Li
* Misc mdoc improvements.brueffer2008-05-101-4/+9
|
* allow setfib to be compiled.julian2008-05-101-0/+1
|
* Add code to allow the system to handle multiple routing tables.julian2008-05-093-0/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This particular implementation is designed to be fully backwards compatible and to be MFC-able to 7.x (and 6.x) Currently the only protocol that can make use of the multiple tables is IPv4 Similar functionality exists in OpenBSD and Linux. From my notes: ----- One thing where FreeBSD has been falling behind, and which by chance I have some time to work on is "policy based routing", which allows different packet streams to be routed by more than just the destination address. Constraints: ------------ I want to make some form of this available in the 6.x tree (and by extension 7.x) , but FreeBSD in general needs it so I might as well do it in -current and back port the portions I need. One of the ways that this can be done is to have the ability to instantiate multiple kernel routing tables (which I will now refer to as "Forwarding Information Bases" or "FIBs" for political correctness reasons). Which FIB a particular packet uses to make the next hop decision can be decided by a number of mechanisms. The policies these mechanisms implement are the "Policies" referred to in "Policy based routing". One of the constraints I have if I try to back port this work to 6.x is that it must be implemented as a EXTENSION to the existing ABIs in 6.x so that third party applications do not need to be recompiled in timespan of the branch. This first version will not have some of the bells and whistles that will come with later versions. It will, for example, be limited to 16 tables in the first commit. Implementation method, Compatible version. (part 1) ------------------------------- For this reason I have implemented a "sufficient subset" of a multiple routing table solution in Perforce, and back-ported it to 6.x. (also in Perforce though not always caught up with what I have done in -current/P4). The subset allows a number of FIBs to be defined at compile time (8 is sufficient for my purposes in 6.x) and implements the changes needed to allow IPV4 to use them. I have not done the changes for ipv6 simply because I do not need it, and I do not have enough knowledge of ipv6 (e.g. neighbor discovery) needed to do it. Other protocol families are left untouched and should there be users with proprietary protocol families, they should continue to work and be oblivious to the existence of the extra FIBs. To understand how this is done, one must know that the current FIB code starts everything off with a single dimensional array of pointers to FIB head structures (One per protocol family), each of which in turn points to the trie of routes available to that family. The basic change in the ABI compatible version of the change is to extent that array to be a 2 dimensional array, so that instead of protocol family X looking at rt_tables[X] for the table it needs, it looks at rt_tables[Y][X] when for all protocol families except ipv4 Y is always 0. Code that is unaware of the change always just sees the first row of the table, which of course looks just like the one dimensional array that existed before. The entry points rtrequest(), rtalloc(), rtalloc1(), rtalloc_ign() are all maintained, but refer only to the first row of the array, so that existing callers in proprietary protocols can continue to do the "right thing". Some new entry points are added, for the exclusive use of ipv4 code called in_rtrequest(), in_rtalloc(), in_rtalloc1() and in_rtalloc_ign(), which have an extra argument which refers the code to the correct row. In addition, there are some new entry points (currently called rtalloc_fib() and friends) that check the Address family being looked up and call either rtalloc() (and friends) if the protocol is not IPv4 forcing the action to row 0 or to the appropriate row if it IS IPv4 (and that info is available). These are for calling from code that is not specific to any particular protocol. The way these are implemented would change in the non ABI preserving code to be added later. One feature of the first version of the code is that for ipv4, the interface routes show up automatically on all the FIBs, so that no matter what FIB you select you always have the basic direct attached hosts available to you. (rtinit() does this automatically). You CAN delete an interface route from one FIB should you want to but by default it's there. ARP information is also available in each FIB. It's assumed that the same machine would have the same MAC address, regardless of which FIB you are using to get to it. This brings us as to how the correct FIB is selected for an outgoing IPV4 packet. Firstly, all packets have a FIB associated with them. if nothing has been done to change it, it will be FIB 0. The FIB is changed in the following ways. Packets fall into one of a number of classes. 1/ locally generated packets, coming from a socket/PCB. Such packets select a FIB from a number associated with the socket/PCB. This in turn is inherited from the process, but can be changed by a socket option. The process in turn inherits it on fork. I have written a utility call setfib that acts a bit like nice.. setfib -3 ping target.example.com # will use fib 3 for ping. It is an obvious extension to make it a property of a jail but I have not done so. It can be achieved by combining the setfib and jail commands. 2/ packets received on an interface for forwarding. By default these packets would use table 0, (or possibly a number settable in a sysctl(not yet)). but prior to routing the firewall can inspect them (see below). (possibly in the future you may be able to associate a FIB with packets received on an interface.. An ifconfig arg, but not yet.) 3/ packets inspected by a packet classifier, which can arbitrarily associate a fib with it on a packet by packet basis. A fib assigned to a packet by a packet classifier (such as ipfw) would over-ride a fib associated by a more default source. (such as cases 1 or 2). 4/ a tcp listen socket associated with a fib will generate accept sockets that are associated with that same fib. 5/ Packets generated in response to some other packet (e.g. reset or icmp packets). These should use the FIB associated with the packet being reponded to. 6/ Packets generated during encapsulation. gif, tun and other tunnel interfaces will encapsulate using the FIB that was in effect withthe proces that set up the tunnel. thus setfib 1 ifconfig gif0 [tunnel instructions] will set the fib for the tunnel to use to be fib 1. Routing messages would be associated with their process, and thus select one FIB or another. messages from the kernel would be associated with the fib they refer to and would only be received by a routing socket associated with that fib. (not yet implemented) In addition Netstat has been edited to be able to cope with the fact that the array is now 2 dimensional. (It looks in system memory using libkvm (!)). Old versions of netstat see only the first FIB. In addition two sysctls are added to give: a) the number of FIBs compiled in (active) b) the default FIB of the calling process. Early testing experience: ------------------------- Basically our (IronPort's) appliance does this functionality already using ipfw fwd but that method has some drawbacks. For example, It can't fully simulate a routing table because it can't influence the socket's choice of local address when a connect() is done. Testing during the generating of these changes has been remarkably smooth so far. Multiple tables have co-existed with no notable side effects, and packets have been routes accordingly. ipfw has grown 2 new keywords: setfib N ip from anay to any count ip from any to any fib N In pf there seems to be a requirement to be able to give symbolic names to the fibs but I do not have that capacity. I am not sure if it is required. SCTP has interestingly enough built in support for this, called VRFs in Cisco parlance. it will be interesting to see how that handles it when it suddenly actually does something. Where to next: -------------------- After committing the ABI compatible version and MFCing it, I'd like to proceed in a forward direction in -current. this will result in some roto-tilling in the routing code. Firstly: the current code's idea of having a separate tree per protocol family, all of the same format, and pointed to by the 1 dimensional array is a bit silly. Especially when one considers that there is code that makes assumptions about every protocol having the same internal structures there. Some protocols don't WANT that sort of structure. (for example the whole idea of a netmask is foreign to appletalk). This needs to be made opaque to the external code. My suggested first change is to add routing method pointers to the 'domain' structure, along with information pointing the data. instead of having an array of pointers to uniform structures, there would be an array pointing to the 'domain' structures for each protocol address domain (protocol family), and the methods this reached would be called. The methods would have an argument that gives FIB number, but the protocol would be free to ignore it. When the ABI can be changed it raises the possibilty of the addition of a fib entry into the "struct route". Currently, the structure contains the sockaddr of the desination, and the resulting fib entry. To make this work fully, one could add a fib number so that given an address and a fib, one can find the third element, the fib entry. Interaction with the ARP layer/ LL layer would need to be revisited as well. Qing Li has been working on this already. This work was sponsored by Ironport Systems/Cisco Reviewed by: several including rwatson, bz and mlair (parts each) Obtained from: Ironport systems/Cisco
* o Change the warning dialog for the 'W' command in both the labelmtm2008-05-052-14/+8
| | | | | | | | | and partition editors to reflect the fact that this is a stand-alone application, not sysinstall(8). o Change an instance of sade(8) refering to itself as sysinstall(8) in a confirmation dialog. MFC after: 1 week
* - Backout 1.15, it was committed by accidentpav2008-05-031-0/+5
| | | | Pointy hat to: pav
* - Restore functionality broken in previous commit; we need to be able to reportpav2008-05-035-32/+37
| | | | | | | multiple installed packages with the same PKGORIGIN. Reported by: marcus MFC after: 1 month
* sade(8) does not need FTP I/O.delphij2008-05-031-2/+2
|
OpenPOWER on IntegriCloud