From owner-p4-projects@FreeBSD.ORG Fri Feb 2 09:10:30 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60FBF16A406; Fri, 2 Feb 2007 09:10:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38CB816A401 for ; Fri, 2 Feb 2007 09:10:30 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 2635413C441 for ; Fri, 2 Feb 2007 09:10:30 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l129AUeK070868 for ; Fri, 2 Feb 2007 09:10:30 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l129ATwC070862 for perforce@freebsd.org; Fri, 2 Feb 2007 09:10:29 GMT (envelope-from bushman@freebsd.org) Date: Fri, 2 Feb 2007 09:10:29 GMT Message-Id: <200702020910.l129ATwC070862@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 113892 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Feb 2007 09:10:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=113892 Change 113892 by bushman@bushman_nss_ldap_cached on 2007/02/02 09:09:51 IFC Affected files ... .. //depot/projects/soc2006/nss_ldap_cached_openldap/nss_ldap_port/src/ldap_passwd.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/etc/etc.powerpc/ttys#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/include/Makefile#5 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/include/objformat.h#2 delete .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/gen/Makefile.inc#3 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/gen/Symbol.map#3 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/gen/getobjformat.3#3 delete .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/gen/getobjformat.c#2 delete .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/stdlib/malloc.c#5 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/sys/quotactl.2#3 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_compat/compat_group.c#4 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_compat/compat_serv.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_dns/dns_passwd.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_nis/nis_hosts_addrinfo.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.libnames.mk#6 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.own.mk#6 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/calendar/calendars/calendar.music#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/Makefile#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/gzexe#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/gzexe.1#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/gzip.1#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/gzip.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/unbzip2.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zdiff#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zdiff.1#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zforce#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zforce.1#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zgrep#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zgrep.1#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zmore#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zmore.1#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/znew#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/znew.1#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/gzip/zuncompress.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/objformat/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/objformat/objformat.1#2 delete .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/objformat/objformat.c#2 delete .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/objformat/objformat.sh#1 branch .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/quota/quota.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/Makefile#5 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/gstat/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/mountd/mountd.c#4 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/pkg_install/add/main.c#4 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/pkg_install/sign/main.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/pkg_install/sign/stand.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/quotaon/quotaon.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/sysinstall/index.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/vnconfig/Makefile#2 delete .. //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.sbin/vnconfig/vnconfig.c#2 delete Differences ... ==== //depot/projects/soc2006/nss_ldap_cached_openldap/nss_ldap_port/src/ldap_passwd.c#3 (text+ko) ==== @@ -188,7 +188,7 @@ _ATM(schema, PASSWD, uid), &pwd->pw_name, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s)", _ATM(schema, PASSWD, uid), rv, __nss_ldap_err2str(rv)); goto errfin; @@ -200,7 +200,7 @@ _ATM(schema, PASSWD, gecos), &pwd->pw_gecos, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s), falling back to %s", _ATM(schema, PASSWD, gecos), rv, __nss_ldap_err2str(rv), _ATM(schema, PASSWD, cn)); @@ -210,7 +210,7 @@ &pwd->pw_gecos, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s)", _ATM(schema, PASSWD, cn), rv, __nss_ldap_err2str(rv)); goto errfin; @@ -224,14 +224,14 @@ _ATM(schema, PASSWD, homeDirectory), &pwd->pw_dir, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s), falling back to empty " "value", _ATM(schema, PASSWD, homeDirectory), rv, __nss_ldap_err2str(rv)); rv = __nss_ldap_assign_str("", &pwd->pw_dir, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: " "can't assign empty value as home directory, " "error %d (%s)", rv, __nss_ldap_err2str(rv)); goto errfin; @@ -244,7 +244,7 @@ _ATM(schema, PASSWD, loginShell), &pwd->pw_shell, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s), falling back to empty " "value", _ATM(schema, PASSWD, loginShell), rv, __nss_ldap_err2str(rv)); @@ -252,7 +252,7 @@ rv = __nss_ldap_assign_str("", &pwd->pw_shell, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: " "can't assign empty value as user shell, " "error %d (%s)", rv, __nss_ldap_err2str(rv)); goto errfin; @@ -265,7 +265,7 @@ _ATM(schema, PASSWD, loginClass), &pwd->pw_class, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s), falling back to empty " "value", _ATM(schema, PASSWD, loginClass), rv, __nss_ldap_err2str(rv)); @@ -273,7 +273,7 @@ rv = __nss_ldap_assign_str("", &pwd->pw_class, &len, buf, buflen); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: " "can't assign empty value as login class, " "error %d (%s)", rv, __nss_ldap_err2str(rv)); goto errfin; @@ -286,7 +286,7 @@ _ATM(schema, PASSWD, uidNumber), &pwd->pw_uid); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s)", _ATM(schema, PASSWD, uidNumber), rv, __nss_ldap_err2str(rv)); goto errfin; @@ -296,7 +296,7 @@ _ATM(schema, PASSWD, gidNumber), &pwd->pw_gid); if (rv != NSS_LDAP_SUCCESS) { - __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s)", _ATM(schema, PASSWD, gidNumber), rv, __nss_ldap_err2str(rv)); @@ -308,7 +308,7 @@ if (rv == NSS_LDAP_SUCCESS) pwd->pw_change *= 24*60*60; else { - __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: ", + __nss_ldap_log(NSS_LDAP_LL_WARN_INT, "nss_ldap_parse_passwd: " "can't assign %s, error %d (%s)", _ATM(schema, PASSWD, shadowMax), rv, __nss_ldap_err2str(rv)); ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/etc/etc.powerpc/ttys#2 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/etc/etc.powerpc/ttys,v 1.3 2005/09/10 22:46:03 grehan Exp $ +# $FreeBSD: src/etc/etc.powerpc/ttys,v 1.4 2007/01/26 06:22:34 marcel Exp $ # @(#)ttys 5.1 (Berkeley) 4/17/89 # # This file specifies various information about terminals on the system. @@ -32,12 +32,6 @@ # when going to single-user mode. console none unknown off secure # -# ofw_console(4) -#screen "/usr/libexec/getty Pc" cons25 on secure -# zs(4) -#ttyy0 "/usr/libexec/getty std.9600" cons25 on secure -#ttyy1 "/usr/libexec/getty std.9600" cons25 off secure -# ttyv0 "/usr/libexec/getty Pc" cons25 on secure # Virtual terminals ttyv1 "/usr/libexec/getty Pc" cons25 on secure @@ -50,10 +44,10 @@ #ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. -ttyd0 "/usr/libexec/getty std.9600" dialup off secure -ttyd1 "/usr/libexec/getty std.9600" dialup off secure -ttyd2 "/usr/libexec/getty std.9600" dialup off secure -ttyd3 "/usr/libexec/getty std.9600" dialup off secure +ttyu0 "/usr/libexec/getty std.9600" vt100 on secure +ttyu1 "/usr/libexec/getty std.9600" dialup off secure +ttyu2 "/usr/libexec/getty std.9600" dialup off secure +ttyu3 "/usr/libexec/getty std.9600" dialup off secure # Dumb console dcons "/usr/libexec/getty std.9600" vt100 off secure # Pseudo terminals ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/include/Makefile#5 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 1/4/94 -# $FreeBSD: src/include/Makefile,v 1.266 2006/11/11 16:26:54 trhodes Exp $ +# $FreeBSD: src/include/Makefile,v 1.267 2007/01/25 22:38:04 peter Exp $ # # Doing a "make install" builds /usr/include. @@ -15,7 +15,7 @@ inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ ndbm.h netconfig.h \ - netdb.h nl_types.h nlist.h nss.h nsswitch.h objformat.h paths.h \ + netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \ printf.h proc_service.h pthread.h \ pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \ res_update.h resolv.h runetype.h search.h setjmp.h sgtty.h \ ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/gen/Makefile.inc#3 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 -# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.125 2006/03/13 01:14:56 deischen Exp $ +# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.126 2007/01/25 22:25:59 peter Exp $ # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen @@ -14,7 +14,7 @@ getbootfile.c getbsize.c \ getcap.c getcwd.c getdomainname.c getgrent.c getgrouplist.c \ gethostname.c getloadavg.c getlogin.c getmntinfo.c getnetgrent.c \ - getobjformat.c getosreldate.c getpagesize.c \ + getosreldate.c getpagesize.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ @@ -49,7 +49,7 @@ getbootfile.3 getbsize.3 getcap.3 getcontext.3 getcwd.3 \ getdiskbyname.3 getdomainname.3 getfsent.3 \ getgrent.3 getgrouplist.3 gethostname.3 getloadavg.3 \ - getmntinfo.3 getnetgrent.3 getobjformat.3 getosreldate.3 \ + getmntinfo.3 getnetgrent.3 getosreldate.3 \ getpagesize.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \ getttyent.3 getusershell.3 getvfsbyname.3 \ glob.3 initgroups.3 isgreater.3 ldexp.3 lockf.3 makecontext.3 \ ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/gen/Symbol.map#3 (text) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libc/gen/Symbol.map,v 1.1 2006/03/13 00:53:17 deischen Exp $ +# $FreeBSD: src/lib/libc/gen/Symbol.map,v 1.2 2007/01/25 22:36:36 peter Exp $ FBSD_1.0 { __xuname; @@ -175,7 +175,6 @@ getnetgrent; endnetgrent; innetgr; - getobjformat; getosreldate; getpagesize; getpeereid; ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/stdlib/malloc.c#5 (text+ko) ==== @@ -185,7 +185,7 @@ #endif #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.138 2006/12/23 00:18:51 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.139 2007/01/31 22:54:19 jasone Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -550,6 +550,14 @@ qr(arena_run_t) link; }; +/* Avoid pointer aliasing issues. */ +static inline arena_run_t * +arena_bin_link(void *ptr) +{ + + return ((arena_run_t *)ptr); +} + struct arena_bin_s { /* * Current run being used to service allocations of this bin's size @@ -1318,7 +1326,7 @@ if (incr == size) { ret = brk_cur; } else { - ret = (void *)(intptr_t)brk_cur + incr; + ret = (void *)((intptr_t)brk_cur + incr); incr += size; } @@ -1326,7 +1334,7 @@ if (brk_prev == brk_cur) { /* Success. */ malloc_mutex_unlock(&brk_mtx); - brk_max = (void *)(intptr_t)ret + size; + brk_max = (void *)((intptr_t)ret + size); goto RETURN; } } while (brk_prev != (void *)-1); @@ -1412,13 +1420,13 @@ * the sake of poorly designed multi-threaded programs. */ if (brk_cur == brk_max - && (void *)(uintptr_t)chunk + size == brk_max + && (void *)((uintptr_t)chunk + size) == brk_max && sbrk(-(intptr_t)size) == brk_max) { malloc_mutex_unlock(&brk_mtx); if (brk_prev == brk_max) { /* Success. */ - brk_prev = (void *)(intptr_t)brk_max - - (intptr_t)size; + brk_prev = (void *)((intptr_t)brk_max + - (intptr_t)size); brk_max = brk_prev; } goto RETURN; @@ -1608,7 +1616,7 @@ mask = run->regs_mask[i]; if (mask != 0) { /* Usable allocation found. */ - bit = ffs(mask) - 1; + bit = ffs((int)mask) - 1; regind = ((i << (SIZEOF_INT_2POW + 3)) + bit); ret = (void *)&((char *)run)[bin->reg0_offset @@ -1764,7 +1772,7 @@ /* Update map for trailing pages. */ map_offset += need_pages; while (map_offset < run_ind + total_pages) { - log2_run_pages = ffs(map_offset) - 1; + log2_run_pages = ffs((int)map_offset) - 1; run_pages = (1 << log2_run_pages); chunk->map[map_offset].free = true; @@ -1848,7 +1856,7 @@ * of by "allocating" the leading pages. */ while (map_offset < (chunk_size >> pagesize_2pow)) { - log2_run_pages = ffs(map_offset) - 1; + log2_run_pages = ffs((int)map_offset) - 1; run_pages = (1 << log2_run_pages); chunk->map[map_offset].free = true; @@ -1904,7 +1912,8 @@ assert(0); break; case RUN_Q0: - qr_before_insert((arena_run_t *)&bin->runs0, run, link); + qr_before_insert(arena_bin_link(&bin->runs0), run, + link); run->free_max = bin->nregs - 1; run->free_min = (bin->nregs >> 1) + 1; assert(run->nfree <= run->free_max); @@ -1912,7 +1921,7 @@ break; case RUN_Q25: qr_remove(run, link); - qr_before_insert((arena_run_t *)&bin->runs25, run, + qr_before_insert(arena_bin_link(&bin->runs25), run, link); run->free_max = ((bin->nregs >> 2) * 3) - 1; run->free_min = (bin->nregs >> 2) + 1; @@ -1921,7 +1930,7 @@ break; case RUN_Q50: qr_remove(run, link); - qr_before_insert((arena_run_t *)&bin->runs50, run, + qr_before_insert(arena_bin_link(&bin->runs50), run, link); run->free_max = (bin->nregs >> 1) - 1; run->free_min = 1; @@ -1985,7 +1994,8 @@ break; case RUN_Q0: qr_remove(run, link); - qr_before_insert((arena_run_t *)&bin->runs0, run, link); + qr_before_insert(arena_bin_link(&bin->runs0), run, + link); run->free_max = bin->nregs - 1; run->free_min = (bin->nregs >> 1) + 1; assert(run->nfree <= run->free_max); @@ -1993,7 +2003,7 @@ break; case RUN_Q25: qr_remove(run, link); - qr_before_insert((arena_run_t *)&bin->runs25, run, + qr_before_insert(arena_bin_link(&bin->runs25), run, link); run->free_max = ((bin->nregs >> 2) * 3) - 1; run->free_min = (bin->nregs >> 2) + 1; @@ -2002,7 +2012,7 @@ break; case RUN_Q50: qr_remove(run, link); - qr_before_insert((arena_run_t *)&bin->runs50, run, + qr_before_insert(arena_bin_link(&bin->runs50), run, link); run->free_max = (bin->nregs >> 1) - 1; run->free_min = 1; @@ -2010,7 +2020,7 @@ assert(run->nfree >= run->free_min); break; case RUN_Q75: - qr_before_insert((arena_run_t *)&bin->runs75, run, + qr_before_insert(arena_bin_link(&bin->runs75), run, link); run->free_max = (bin->nregs >> 2) - 1; run->free_min = 1; @@ -2047,7 +2057,7 @@ * large enough. Look for a precise fit, but do not pass up a chunk * that has a run which is large enough to split. */ - min_ind = ffs(size >> pagesize_2pow) - 1; + min_ind = ffs((int)(size >> pagesize_2pow)) - 1; RB_FOREACH(chunk, arena_chunk_tree_s, &arena->chunks) { for (i = min_ind; i < (opt_chunk_2pow - pagesize_2pow); @@ -2096,7 +2106,7 @@ run_ind = (unsigned)(((uintptr_t)run - (uintptr_t)chunk) >> pagesize_2pow); run_pages = (size >> pagesize_2pow); - log2_run_pages = ffs(run_pages) - 1; + log2_run_pages = ffs((int)run_pages) - 1; assert(run_pages > 0); /* Subtract pages from count of pages used in chunk. */ @@ -2168,14 +2178,14 @@ unsigned i, remainder; /* Look for a usable run. */ - if ((run = qr_next((arena_run_t *)&bin->runs50, link)) - != (arena_run_t *)&bin->runs50 - || (run = qr_next((arena_run_t *)&bin->runs25, link)) - != (arena_run_t *)&bin->runs25 - || (run = qr_next((arena_run_t *)&bin->runs0, link)) - != (arena_run_t *)&bin->runs0 - || (run = qr_next((arena_run_t *)&bin->runs75, link)) - != (arena_run_t *)&bin->runs75) { + if ((run = qr_next(arena_bin_link(&bin->runs50), link)) + != arena_bin_link(&bin->runs50) + || (run = qr_next(arena_bin_link(&bin->runs25), link)) + != arena_bin_link(&bin->runs25) + || (run = qr_next(arena_bin_link(&bin->runs0), link)) + != arena_bin_link(&bin->runs0) + || (run = qr_next(arena_bin_link(&bin->runs75), link)) + != arena_bin_link(&bin->runs75)) { /* run is guaranteed to have available space. */ qr_remove(run, link); return (run); @@ -2276,7 +2286,8 @@ if (size < small_min) { /* Tiny. */ size = pow2_ceil(size); - bin = &arena->bins[ffs(size >> (tiny_min_2pow + 1))]; + bin = &arena->bins[ffs((int)(size >> (tiny_min_2pow + + 1)))]; #if (!defined(NDEBUG) || defined(MALLOC_STATS)) /* * Bin calculation is always correct, but we may need @@ -2295,7 +2306,7 @@ /* Sub-page. */ size = pow2_ceil(size); bin = &arena->bins[ntbins + nqbins - + (ffs(size >> opt_small_max_2pow) - 2)]; + + (ffs((int)(size >> opt_small_max_2pow)) - 2)]; } assert(size == bin->reg_size); @@ -2375,8 +2386,8 @@ /* Avoid moving the allocation if the size class would not change. */ if (size < small_min) { if (oldsize < small_min && - ffs(pow2_ceil(size) >> (tiny_min_2pow + 1)) - == ffs(pow2_ceil(oldsize) >> (tiny_min_2pow + 1))) + ffs((int)(pow2_ceil(size) >> (tiny_min_2pow + 1))) + == ffs((int)(pow2_ceil(oldsize) >> (tiny_min_2pow + 1)))) goto IN_PLACE; } else if (size <= small_max) { if (oldsize >= small_min && oldsize <= small_max && @@ -2493,10 +2504,10 @@ for (i = 0; i < ntbins; i++) { bin = &arena->bins[i]; bin->runcur = NULL; - qr_new((arena_run_t *)&bin->runs0, link); - qr_new((arena_run_t *)&bin->runs25, link); - qr_new((arena_run_t *)&bin->runs50, link); - qr_new((arena_run_t *)&bin->runs75, link); + qr_new(arena_bin_link(&bin->runs0), link); + qr_new(arena_bin_link(&bin->runs25), link); + qr_new(arena_bin_link(&bin->runs50), link); + qr_new(arena_bin_link(&bin->runs75), link); bin->reg_size = (1 << (tiny_min_2pow + i)); @@ -2530,10 +2541,10 @@ for (; i < ntbins + nqbins; i++) { bin = &arena->bins[i]; bin->runcur = NULL; - qr_new((arena_run_t *)&bin->runs0, link); - qr_new((arena_run_t *)&bin->runs25, link); - qr_new((arena_run_t *)&bin->runs50, link); - qr_new((arena_run_t *)&bin->runs75, link); + qr_new(arena_bin_link(&bin->runs0), link); + qr_new(arena_bin_link(&bin->runs25), link); + qr_new(arena_bin_link(&bin->runs50), link); + qr_new(arena_bin_link(&bin->runs75), link); bin->reg_size = quantum * (i - ntbins + 1); @@ -2564,10 +2575,10 @@ for (; i < ntbins + nqbins + nsbins; i++) { bin = &arena->bins[i]; bin->runcur = NULL; - qr_new((arena_run_t *)&bin->runs0, link); - qr_new((arena_run_t *)&bin->runs25, link); - qr_new((arena_run_t *)&bin->runs50, link); - qr_new((arena_run_t *)&bin->runs75, link); + qr_new(arena_bin_link(&bin->runs0), link); + qr_new(arena_bin_link(&bin->runs25), link); + qr_new(arena_bin_link(&bin->runs50), link); + qr_new(arena_bin_link(&bin->runs75), link); bin->reg_size = (small_max << (i - (ntbins + nqbins) + 1)); @@ -2940,7 +2951,7 @@ malloc_mutex_lock(&chunks_mtx); /* Extract from tree of huge allocations. */ - key.chunk = (void *)ptr; + key.chunk = __DECONST(void *, ptr); node = RB_FIND(chunk_tree_s, &huge, &key); assert(node != NULL); @@ -3150,7 +3161,7 @@ * pagesize_2pow. */ assert(((result - 1) & result) == 0); - pagesize_2pow = ffs(result) - 1; + pagesize_2pow = ffs((int)result) - 1; } for (i = 0; i < 3; i++) { @@ -3410,7 +3421,7 @@ 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263}; - unsigned i, nprimes, parenas; + unsigned nprimes, parenas; /* * Pick a prime number of hash arenas that is more than narenas @@ -3559,6 +3570,7 @@ size_t num_size; if (malloc_init()) { + num_size = 0; ret = NULL; goto RETURN; } ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/libc/sys/quotactl.2#3 (text+ko) ==== @@ -29,7 +29,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)quotactl.2 8.2 (Berkeley) 3/10/95 -.\" $FreeBSD: src/lib/libc/sys/quotactl.2,v 1.25 2007/01/09 00:28:15 imp Exp $ +.\" $FreeBSD: src/lib/libc/sys/quotactl.2,v 1.26 2007/02/01 02:31:02 mpp Exp $ .\" .Dd March 5, 1999 .Dt QUOTACTL 2 @@ -54,7 +54,7 @@ .Fa cmd operates on the given filename .Fa path -for the given user +for the given user or group .Fa id . (NOTE: One should use the QCMD macro defined in .In ufs/ufs/quota.h @@ -65,6 +65,12 @@ may be given; its interpretation is discussed below with each command. .Pp +For commands that use the +.Fa id +identifier, it must be either -1 or any positive value. +The value of -1 indicates that the current UID or GID should be used. +Any other negative value will return an error. +.Pp Currently quotas are supported only for the .Dq ufs file system. @@ -175,6 +181,15 @@ and .Dv Q_SETQUOTA , quotas are not currently enabled for this file system. +.Pp +The +.Fa id +argument to +.Dv Q_GETQUOTA , +.Dv Q_SETQUOTA +or +.Dv Q_SETUSE +is a negative value. .It Bq Er EACCES In .Dv Q_QUOTAON , ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_compat/compat_group.c#4 (text+ko) ==== @@ -39,14 +39,15 @@ #include #include #include +#include "namespace.h" #include #include +#include "un-namespace.h" #include #include #include #include #include -#include "libc_private.h" #include "nss_tls.h" #include "gr_scan.h" #include "nss_compat.h" ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_compat/compat_serv.c#3 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_dns/dns_passwd.c#2 (text+ko) ==== @@ -54,7 +54,6 @@ #include #include #include -#include "libc_private.h" #include "nss_tls.h" #include "pw_scan.h" ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_nis/nis_hosts_addrinfo.c#2 (text+ko) ==== @@ -90,7 +90,6 @@ #include #include #include -#include "libc_private.h" #include "res_config.h" #ifdef DEBUG ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.libnames.mk#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/mk/bsd.libnames.mk,v 1.99 2006/09/30 11:32:46 ru Exp $ +# $FreeBSD: src/share/mk/bsd.libnames.mk,v 1.100 2007/02/01 08:45:27 rafan Exp $ # The include file define library names. # Other include files (e.g. bsd.prog.mk, bsd.lib.mk) include this @@ -85,7 +85,6 @@ LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a .endif LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a -LIBMYTINFO?= "don't use LIBMYTINFO, use LIBNCURSES" .if ${MK_NCP} != "no" LIBNCP?= ${DESTDIR}${LIBDIR}/libncp.a .endif ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.own.mk#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/mk/bsd.own.mk,v 1.59 2006/11/19 16:28:52 ru Exp $ +# $FreeBSD: src/share/mk/bsd.own.mk,v 1.60 2007/01/26 10:19:07 delphij Exp $ # # The include file set common variables for owner, # group, mode, and directories. Defaults are in brackets. @@ -299,6 +299,7 @@ BIND_UTILS \ BLUETOOTH \ BOOT \ + BZIP2 \ CALENDAR \ CDDL \ CPP \ @@ -443,6 +444,7 @@ # MK_* variable is set to "no". # .for var in \ + BZIP2 \ GNU \ INET6 \ IPX \ ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)Makefile 8.3 (Berkeley) 1/7/94 -# $FreeBSD: src/usr.bin/Makefile,v 1.297 2006/11/26 14:36:33 ru Exp $ +# $FreeBSD: src/usr.bin/Makefile,v 1.299 2007/01/26 10:19:07 delphij Exp $ .include @@ -75,6 +75,7 @@ getent \ getopt \ ${_gprof} \ + gzip \ head \ ${_hesinfo} \ hexdump \ @@ -139,7 +140,6 @@ nohup \ ${_nslookup} \ ${_nsupdate} \ - objformat \ opieinfo \ opiekey \ opiepasswd \ ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1#2 (text+ko) ==== @@ -23,9 +23,9 @@ .\" SUCH DAMAGE. .\" .\" $Id: rfcomm_sppd.1,v 1.3 2003/09/07 18:15:55 max Exp $ -.\" $FreeBSD: src/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1,v 1.9 2005/12/07 19:41:58 emax Exp $ +.\" $FreeBSD: src/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.1,v 1.10 2007/01/25 20:54:59 emax Exp $ .\" -.Dd April 26, 2003 +.Dd January 24, 2007 .Dt RFCOMM_SPPD 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd RFCOMM Serial Port Profile daemon .Sh SYNOPSIS .Nm -.Op Fl bh +.Op Fl bhS .Fl a Ar address .Fl c Ar channel .Op Fl t Ar tty @@ -41,7 +41,11 @@ The .Nm utility is a Serial Port Profile daemon. -It opens RFCOMM connection to the specified +It can operate in two modes: client and server. +.Pp +In client mode, +.Nm +opens RFCOMM connection to the specified .Ar address server and .Ar channel . @@ -54,8 +58,29 @@ .Fl t option was specified. .Pp +If the +.Fl S +option is specified, +.Nm +will operate in server mode and act as RFCOMM server, +listening on +.Dv ANY +address and advertising a virtual serial port +via the +.Xr sdpd 8 +daemon. The +.Fl t +option must be specified; +the server side of the virtual serial port is attached to the pseudo-terminal +.Ar tty . .Nm +should be run as root in order to communicate with +.Xr sdp 8 +in this case. +.Pp +The +.Nm utility opens both master and slave pseudo terminals. This is done to ensure that RFCOMM connection stays open until .Nm @@ -71,17 +96,31 @@ The options are as follows: .Bl -tag -width indent .It Fl a Ar address -This required option specifies the address of the remote RFCOMM server. +In client mode, +this required option specifies the address of the remote RFCOMM server. +If this option is specified in server mode, +.Nm +will only accept connections from the +.Tn Bluetooth +device with address +.Ar address . The address can be specified as BD_ADDR or name. -If name was specified then the +If name was specified then .Nm utility will attempt to resolve the name via .Xr bt_gethostbyname 3 . .It Fl b Detach from the controlling terminal, i.e., run in background. .It Fl c Ar channel -This option specifies RFCOMM channel to connect to. -RFCOMM channel could either be a number between 1 and 30 or a service name. +In both client and server mode, +this required option specifies the RFCOMM channel to connect to or listen on. +In server mode, +the channel should be a number between 1 and 30. +If not specified, +.Nm +will try to allocate RFCOMM channel number based on process ID. +In client mode, +the channel could either be a number between 1 and 30 or a service name. Supported service names are: .Cm DUN (for DialUp Networking service), @@ -97,11 +136,16 @@ Discovery Protocol from the server. .It Fl h Display usage message and exit. +.It Fl S +Server mode; see +.Sx DESCRIPTION . .It Fl t Ar tty Slave pseudo tty name. If not set stdin/stdout will be used. This option is required if .Fl b +or +.Fl S option was specified. .El .Sh FILES @@ -129,7 +173,8 @@ .Xr bluetooth 3 , .Xr ng_btsocket 4 , .Xr pty 4 , -.Xr rfcomm_pppd 8 +.Xr rfcomm_pppd 8 , +.Xr sdpd 8 .Sh AUTHORS .An Maksim Yevmenkin Aq m_evmenkin@yahoo.com .Sh BUGS ==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $Id: rfcomm_sppd.c,v 1.4 2003/09/07 18:15:55 max Exp $ - * $FreeBSD: src/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c,v 1.8 2005/12/07 19:41:58 emax Exp $ + * $FreeBSD: src/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c,v 1.9 2007/01/25 20:54:59 emax Exp $ */ #include @@ -72,16 +72,17 @@ struct sockaddr_rfcomm ra; bdaddr_t addr; int n, background, channel, service, - s, amaster, aslave, fd; + s, amaster, aslave, fd, doserver; fd_set rfd; char *tty = NULL, *ep = NULL, buf[SPPD_BUFFER_SIZE]; memcpy(&addr, NG_HCI_BDADDR_ANY, sizeof(addr)); background = channel = 0; service = SDP_SERVICE_CLASS_SERIAL_PORT; + doserver = 0; /* Parse command line options */ - while ((n = getopt(argc, argv, "a:bc:t:h")) != -1) { + while ((n = getopt(argc, argv, "a:bc:t:hS")) != -1) { switch (n) { case 'a': /* BDADDR */ if (!bt_aton(optarg, &addr)) { @@ -134,6 +135,10 @@ tty = optarg; break; + case 'S': + doserver = 1; + break; + case 'h': default: usage(); @@ -142,7 +147,7 @@ } /* Check if we have everything we need */ - if (memcmp(&addr, NG_HCI_BDADDR_ANY, sizeof(addr)) == 0) + if (!doserver && memcmp(&addr, NG_HCI_BDADDR_ANY, sizeof(addr)) == 0) usage(); /* NOT REACHED */ @@ -165,17 +170,9 @@ if (sigaction(SIGCHLD, &sa, NULL) < 0) err(1, "Could not sigaction(SIGCHLD)"); - /* Check channel, if was not set then obtain it via SDP */ - if (channel == 0 && service != 0) - if (rfcomm_channel_lookup(NULL, &addr, - service, &channel, &n) != 0) - errc(1, n, "Could not obtain RFCOMM channel"); - if (channel <= 0 || channel > 30) - errx(1, "Invalid RFCOMM channel number %d", channel); - /* Open TTYs */ if (tty == NULL) { - if (background) + if (background || doserver) usage(); amaster = STDIN_FILENO; @@ -187,24 +184,95 @@ fd = amaster; } + /* Open RFCOMM connection */ + + if (doserver) { + struct sockaddr_rfcomm ma; + bdaddr_t bt_addr_any; + sdp_lan_profile_t lan; + void *ss; + uint32_t sdp_handle; + int acceptsock, aaddrlen; + + if (channel == 0) { + /* XXX: should check if selected channel is unused */ + channel = (getpid() % 30) + 1; + } + acceptsock = socket(PF_BLUETOOTH, SOCK_STREAM, + BLUETOOTH_PROTO_RFCOMM); + if (acceptsock < 0) + err(1, "Could not create socket"); + + memset(&ma, 0, sizeof(ma)); + ma.rfcomm_len = sizeof(ma); + ma.rfcomm_family = AF_BLUETOOTH; + ma.rfcomm_channel = channel; + + if (bind(acceptsock, (struct sockaddr *)&ma, sizeof(ma)) < 0) + err(1, "Could not bind socket -- channel %d in use?", + channel); + listen(acceptsock, 10); + + ss = sdp_open_local(NULL); + if (ss == NULL) + errx(1, "Unable to create local SDP session"); + if (sdp_error(ss) != 0) + errx(1, "Unable to open local SDP session. %s (%d)", + strerror(sdp_error(ss)), sdp_error(ss)); + memset(&lan, 0, sizeof(lan)); + lan.server_channel = channel; + + memcpy(&bt_addr_any, NG_HCI_BDADDR_ANY, sizeof(bt_addr_any)); + if (sdp_register_service(ss, service, &bt_addr_any, + (void *)&lan, sizeof(lan), &sdp_handle) != 0) { + errx(1, "Unable to register LAN service with " + "local SDP daemon. %s (%d)", + strerror(sdp_error(ss)), sdp_error(ss)); + } + + s = -1; + while (s < 0) { + aaddrlen = sizeof(ra); + s = accept(acceptsock, (struct sockaddr *)&ra, + &aaddrlen); + if (s < 0) + err(1, "Unable to accept()"); + if (memcmp(&addr, NG_HCI_BDADDR_ANY, sizeof(addr)) && + memcmp(&addr, &ra.rfcomm_bdaddr, sizeof(addr))) { >>> TRUNCATED FOR MAIL (1000 lines) <<<