summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* o style(9) and consistency fix:Chris D. Faulhaber2002-02-211-2/+2
| | | | | | | | | | | - if (!var) -> if (var == NULL) o spelling fix (althouh -> although) Reviewed by: rwatson Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=91035
* o style(9) and consistency fixes:Chris D. Faulhaber2002-02-215-44/+41
| | | | | | | | | | | - if (!var) -> if (var == NULL) - return val; -> return (val); Reviewed by: rwatson Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=91034
* Add more argument checkingChris D. Faulhaber2002-02-212-0/+17
| | | | | | | | Reviewed by: rwatson Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=91033
* static'ize and declare functionsChris D. Faulhaber2002-02-211-1/+5
| | | | | | | | Reviewed by: rwatson Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=91032
* Fixed divots that I created when I moved prototypes of group_from_gidWarner Losh2002-02-192-2/+3
| | | | | | | | | | and user_from_uid to grp.h and pwd.h. Update the man pages. Submitted by: David Malone Pointy hat to: imp Notes: svn path=/head/; revision=90878
* o Move NTOHL() and associated macros into <sys/param.h>. These areMike Barcroft2002-02-1835-33/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm Notes: svn path=/head/; revision=90868
* o style and consistency fixes:Chris D. Faulhaber2002-02-176-40/+40
| | | | | | | | | - if (!var) -> if (var == NULL) - return val; -> return (val); o update copyright Notes: svn path=/head/; revision=90781
* Fix two file descriptor leaks in the internal function local_rpcb()Ian Dowse2002-02-161-1/+8
| | | | | | | | | | | that is used by a number of rpcbind-related library functions. Also fix a rpc client leak in rpcb_set(). Submitted by: mbr Obtained from: NetBSD Notes: svn path=/head/; revision=90735
* Document that the type of st_flags is now fflags_t.Garrett Wollman2002-02-151-2/+2
| | | | Notes: svn path=/head/; revision=90712
* Don't leave stack garbage in the reserved fields of the header.Bruce Evans2002-02-151-0/+1
| | | | Notes: svn path=/head/; revision=90668
* Fixed style bugs in rev.1.5:Bruce Evans2002-02-151-4/+5
| | | | | | | | | | | | | - missing whitespace - strange version of warn() built out of warnx() + strerror(). Just use warn(). - conversion of just one of the two perror()'s to warn*() Actually use _warn() instead of _warn(), to keep up with namespace- unpollution for warn(). Notes: svn path=/head/; revision=90667
* Use new-style function declations.Warner Losh2002-02-131-6/+2
| | | | Notes: svn path=/head/; revision=90605
* Don't make it seem like vm.max_proc_mmap only affects MAP_FIXED.Dima Dorfman2002-02-101-4/+4
| | | | | | | | | PR: 34005 Submitted by: Steven Grady <grady@digitaldeck..com>, Hiten Pandya <hitmaster2k@yahoo.com> Notes: svn path=/head/; revision=90482
* Part III: Update extended attribute system call interface documentation.Robert Watson2002-02-101-18/+39
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=90450
* FreeBSD 4.1 bootstrapping aid (__FBSDID is not there).Ruslan Ermilov2002-02-082-0/+4
| | | | Notes: svn path=/head/; revision=90393
* Move the AF_LOCAL check to the AF_INET check since portmap protocolAlfred Perlstein2002-02-061-5/+1
| | | | | | | | | v. 2 only needs this. That also makes it shorter and simpler. Submitted by: mbr Notes: svn path=/head/; revision=90316
* ANSIfy and remove some dead code.Dag-Erling Smørgrav2002-02-062-81/+35
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=90298
* Apply the following mechanical transformations in preparation forDag-Erling Smørgrav2002-02-062-133/+133
| | | | | | | | | | | | | | | | | | | | ansification and constification: s{\s+__P\((\(.*?\))\)}{$1}g; s{\(\s+}{\(}g; s{\s+\)}{\)}g; s{\s+,}{,}g; s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g; s{return ([^\(].*?);}{return ($1);}g; s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g; s{\s+$}{\n};g Also add $FreeBSD$ where needed. MFC after: 1 week Notes: svn path=/head/; revision=90297
* balance parens.Alfred Perlstein2002-02-051-1/+1
| | | | | | | Submitted by: mbr Notes: svn path=/head/; revision=90273
* For RPC v2 we need to fill in ret->xp_raddr too. INET_6Alfred Perlstein2002-02-051-1/+1
| | | | | | | | | is not supported in portmap, so we don't have to care about it. Submitted by: mbr Notes: svn path=/head/; revision=90272
* Fix cc -Wall, fix rcsid warnings, add missing prototypes,Alfred Perlstein2002-02-0519-22/+37
| | | | | | | | | | | | change prototypes to be the same as in the original sun tirpc code. Remove ()P macro in a file where the mayority had ()P already removed. Add them if the mayority use ()P macros. Submitted by: mbr Requested by: bde Notes: svn path=/head/; revision=90271
* Do not call addrinfo on local transport adresses, if returning aAlfred Perlstein2002-02-051-5/+25
| | | | | | | | | | | | server handle (for reuse or whatever). We just return now a handle connected to the local rpcbind. Do not try to call checkcache, if host = NULL; Submitted by: mbr Notes: svn path=/head/; revision=90269
* style: return(x) -> return (x)Alfred Perlstein2002-02-051-2/+2
| | | | | | | Submitted by: mbr Notes: svn path=/head/; revision=90258
* Fix the credential handling code.Alfred Perlstein2002-02-051-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In NetBSD, Solaris, xprt->xp_p2 pointed directly to the credentials, in FreeBSD xprt->xp_verf.oa_base was a pointer to a struct cmessage, which is defined as follow: struct cmessage { struct cmsghdr cmsg; struct cmsgcred cmcred; }; The credentials were submitted the right way and xprt->xp_p2 pointed to them. But cb_verf.oa_flavor was still empty. There was an assignment missing in svc_recv() in svc_vc.c: msg->rm_call.cb_verf.oa_flavor = AUTH_UNIX; Also + if (addr.ss_family == AF_LOCAL) { + xprt->xp_raddr = *(struct sockaddr_in *)xprt->xp_rtaddr.buf; + xprt->xp_addrlen = sizeof (struct sockaddr_in); + } was missing. But the first seems not to be needed: I guess in rpc.yppasswdd there was a typo: - transp>xp_verf.oa_flavor != AUTH_UNIX) { + rqstp->rq_cred.oa_flavor != AUTH_UNIX) { This little fix does fix the breakage in rpc.yppasswdd :-) + if (msg.msg_controllen == 0 || + (msg.msg_flags & MSG_CTRUNC) != 0) + return (-1); We cannot set the cb_verf.oa_length in svc_recv() of svc_vc.c, the credentials get overwritten then, and that's bad. Submitted by: mbr Notes: svn path=/head/; revision=90257
* The clnt_create(KEYSERVSOCK, CRYPT_PROG, CRYPT_VERS, "unix") hacksAlfred Perlstein2002-02-051-6/+17
| | | | | | | | | | | | | | | | were removed and replaced them with clnt_tp_create, now the af_local support is fixed. I also removed the hack how rpcinfo contacted rpcbind, now we can relay on clnt_tp_create create the client-handle for us. Only rpcbind itself needs a hardcoded socket-path. Submitted by: mbr Also add $FreeBSD Notes: svn path=/head/; revision=90256
* Allow ldd(1) be used on shared libraries in addition to executables.Maxim Sobolev2002-02-041-0/+7
| | | | Notes: svn path=/head/; revision=90172
* Fixed tab lossage in vendor id and nearby style bugs in previous commit.Bruce Evans2002-02-011-1/+4
| | | | Notes: svn path=/head/; revision=90096
* Fixed syntax error in previous commit. It was non-fatal because it wasBruce Evans2002-02-011-3/+5
| | | | | | | | | | in conditional code that happens not to be compiled, and because gcc doesn't complain garbage after #endif by default. Fixed some style bugs in previous commit, 1.8 and 1.1. Notes: svn path=/head/; revision=90095
* Return ENONAME if getaddrinfo() is called with AI_NUMERICHOSTPeter Pentchev2002-02-011-1/+1
| | | | | | | | | | | | and the hostname given is not numeric. PR: 34390 Submitted by: Serge van den Boom <svdb@stack.nl> Approved by: silence from -net MFC after: 1 month Notes: svn path=/head/; revision=90053
* Fixed slipage in editor.David E. O'Brien2002-02-011-0/+1
| | | | Notes: svn path=/head/; revision=90050
* Cut-n-paste in `list' mode considered harmful.David E. O'Brien2002-02-012-5/+5
| | | | Notes: svn path=/head/; revision=90049
* * Remove __P and convert to ANSI prototypes.David E. O'Brien2002-02-012-19/+17
| | | | | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's. Notes: svn path=/head/; revision=90046
* * Remove __P and convert to ANSI prototypes.David E. O'Brien2002-02-0116-264/+245
| | | | | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's. Notes: svn path=/head/; revision=90045
* * Remove 'register'. (some functions had 7+ register functions...)David E. O'Brien2002-02-0116-68/+77
| | | | | | | * Fix SCM ID's. Notes: svn path=/head/; revision=90041
* Fix SCM ID's.David E. O'Brien2002-02-0162-207/+166
| | | | Notes: svn path=/head/; revision=90039
* Fix minor style nit.David E. O'Brien2002-01-311-1/+3
| | | | Notes: svn path=/head/; revision=90030
* Revert last commit. stdio.h include is for perror(), not strerror()Chris D. Faulhaber2002-01-311-1/+1
| | | | Notes: svn path=/head/; revision=90021
* strerror(3) is in string.h, not stdio.hChris D. Faulhaber2002-01-311-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=90017
* Fixed world breakage due to missing include of <sys/cdefs.h> in previousBruce Evans2002-01-314-5/+17
| | | | | | | | | | | | | | | commit. Fixed related style bugs: basename.c: misplaced '#if 0' dirname.c: misplaced '#if 0' getgrent.c: missing '#if 0', and tab lossage in vendor id (the previous commit fixed the complete corruption of the vendor id but lost a tab) getpwent.c: missing '#if 0' Notes: svn path=/head/; revision=90016
* Fix FreeBSD IDs.David E. O'Brien2002-01-305-15/+12
| | | | Notes: svn path=/head/; revision=89999
* Correct function's description.Chris D. Faulhaber2002-01-291-1/+1
| | | | | | | Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=89953
* Do not try to convert to char already converted C monetary locale members.Andrey A. Chernov2002-01-282-28/+40
| | | | | | | Do this conversion on locale load stage instead. Notes: svn path=/head/; revision=89907
* o return EINVAL if acl_to_text() have been sent a NULL acl. ↵Chris D. Faulhaber2002-01-261-1/+6
| | | | | | | | | o update copyright dates. Reviewed by: rwatson Notes: svn path=/head/; revision=89831
* Use ctime_r to build the timestamp for syslog, so that we don'tDavid Malone2002-01-251-2/+2
| | | | | | | | | | | clobber a ctime buffer which is passed in. PR: 34022 Submitted by: Hartmut Brandt <brandt@fokus.gmd.de> MFC after: 2 weeks Notes: svn path=/head/; revision=89805
* get __time_load_locale() prototype from include file, rather than declareAlexey Zelkin2002-01-241-3/+2
| | | | | | | own Notes: svn path=/head/; revision=89739
* * style(9)'fyAlexey Zelkin2002-01-242-33/+34
| | | | | | | * declare prototype for __time_load_locale() in timelocal.h Notes: svn path=/head/; revision=89736
* Change brk's prototype from char *brk(const char *) to int brk(const void *)David Malone2002-01-241-15/+7
| | | | | | | | | | | | | | | | | | and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t). This makes us more consistant with NetBSD and standards which include these functions. Bruce pointed out that ptrdiff_t would probably have been better than intptr_t, but this doesn't match other implimentations. Also remove local declarations of sbrk and unnecessary casting. PR: 32296 Tested by: Harti Brandt <brandt@fokus.gmd.de> MFC after: 1 month Notes: svn path=/head/; revision=89732
* The sixth argument to the NET_RT_IFLIST sysctl is actually 0 forRuslan Ermilov2002-01-231-1/+1
| | | | | | | all interfaces, and ifnet.if_index value for a single interface. Notes: svn path=/head/; revision=89700
* Restore C99 standard conformance information, isblank() _is_ in finalAndrey A. Chernov2002-01-221-0/+5
| | | | | | | | | standard document Pointed by: "Jacques A. Vidrine" <n@nectar.cc> Notes: svn path=/head/; revision=89670
* Use the proper type (gid_t) for (group)->gr_gid to be orthogonalMark Murray2002-01-225-15/+16
| | | | | | | | | with uid_t usage and (user)->pw_uid. PR: 3242 Notes: svn path=/head/; revision=89663