Index: Makefile =================================================================== RCS file: /cvs/proj/raq/cce/Makefile,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 Makefile --- Makefile 3 Oct 2004 19:05:45 -0000 1.1.1.1 +++ Makefile 4 Oct 2004 17:56:49 -0000 @@ -11,6 +11,12 @@ include rules.mk CCEMODULE = sausalito-cce CCERPMSPEC = $(CCEMODULE).spec +ifeq ($(shell uname -s),FreeBSD) +SPEC_SUB = -e 's/^make /gmake /' +else +SPEC_SUB = +endif + CCE_V_MAJ=0 CCE_V_MIN=80 CCE_V_PATCH=2 @@ -52,19 +58,19 @@ dynamic.mk: Makefile @echo "$@ created" common/common.a: FORCE - make -C common + $(MAKE) -C common scalar/scalar.a: FORCE - make -C scalar + $(MAKE) -C scalar conf/conf.a: FORCE - make -C conf + $(MAKE) -C conf codb/codb.a: FORCE - make -C codb + $(MAKE) -C codb ed/ed.a: FORCE - make -C ed + $(MAKE) -C ed cscp/cscp.a: FORCE - make -C cscp + $(MAKE) -C cscp sessionmgr/sessionmgr.a: FORCE - make -C sessionmgr + $(MAKE) -C sessionmgr $(COMMONLIB): $(COMMONLIB_LIBS) @echo @@ -148,6 +154,7 @@ endif specfile: $(CCERPMSPEC).in sed -e 's/XX_VER_XX/$(CCE_VERSION)/' \ + $(SPEC_SUB) \ -e 's/XX_REL_XX/$(RPMRELEASE)/' $(CCERPMSPEC).in > $(CCERPMSPEC) rpm_upload: Index: rules.mk =================================================================== RCS file: /cvs/proj/raq/cce/rules.mk,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 rules.mk --- rules.mk 3 Oct 2004 19:05:45 -0000 1.1.1.1 +++ rules.mk 4 Oct 2004 17:56:49 -0000 @@ -39,7 +39,7 @@ SYS_PAMDIR = $(PREFIX)/etc/pam.d SYS_APACHELIBDIR = $(PREFIX)/usr/lib/apache # install flags -INST_DEFAULT = -o root -g root +INST_DEFAULT = -o root -g wheel INST_SBINFLAGS = $(INST_DEFAULT) -m 700 INST_BINFLAGS = $(INST_DEFAULT) -m 755 INST_FILEFLAGS = $(INST_DEFAULT) -m 644 @@ -53,7 +53,6 @@ LD = ld AR = ar RM = rm LEX = flex -MAKE = make RANLIB = ranlib INSTALL = install LDCONFIG = ldconfig Index: ccewrap/Makefile =================================================================== RCS file: /cvs/proj/raq/cce/ccewrap/Makefile,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 Makefile --- ccewrap/Makefile 3 Oct 2004 19:05:46 -0000 1.1.1.1 +++ ccewrap/Makefile 4 Oct 2004 17:56:49 -0000 @@ -18,8 +18,8 @@ $(TITLE): $(OBJS) install: all $(INSTALL) -m 4750 -o root -g httpd $(TITLE) $(CCE_BINDIR) - $(INSTALL) -m 600 -o root -g root $(CONF) $(PREFIX)/etc - $(INSTALL) -d 700 -o root -g root $(PREFIX)/etc/ccewrap.d + $(INSTALL) -m 600 -o root -g wheel $(CONF) $(PREFIX)/etc + $(INSTALL) -d 700 -o root -g wheel $(PREFIX)/etc/ccewrap.d clean: rm -f $(TITLE) $(OBJS) Index: client/Makefile =================================================================== RCS file: /cvs/proj/raq/cce/client/Makefile,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 Makefile --- client/Makefile 3 Oct 2004 19:05:49 -0000 1.1.1.1 +++ client/Makefile 4 Oct 2004 17:56:49 -0000 @@ -25,35 +25,35 @@ LOCALES=$(shell dir=locale; \ # these are only useful to non SLK builds ifneq ($(SLK_BUILD), yes) all: mod_locale - make -C src all - make -C php all + $(MAKE) -C src all + $(MAKE) -C php all clean: - make -C src clean - make -C php clean + $(MAKE) -C src clean + $(MAKE) -C php clean rm -f *.spec rm -f locale/*/*.mo endif install: perl_inst install_locale install_headers - make -C src install - make -C php install + $(MAKE) -C src install + $(MAKE) -C php install test: - make -C src test - make -C php test + $(MAKE) -C src test + $(MAKE) -C php test perl_inst: $(PERLSRCS) mkdir -p $(CCE_PERLDIR) || /bin/true for t in $^; do \ - install -o root -g root -m 755 $$t $(CCE_PERLDIR); \ + install -o root -g wheel -m 755 $$t $(CCE_PERLDIR); \ done LOC_FILE=/usr/sausalito/devel/module.mk install_headers: mkdir -p $(CCEINCDIR)/cce/ - $(INSTALL) -o root -g root -m 644 include/*.h $(CCEINCDIR)/cce/ + $(INSTALL) -o root -g wheel -m 644 include/*.h $(CCEINCDIR)/cce/ ifeq ($(SLK_BUILD), yes) #include /usr/sausalito/devel/module.mk Index: client/include/c6.h =================================================================== RCS file: /cvs/proj/raq/cce/client/include/c6.h,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 c6.h --- client/include/c6.h 3 Oct 2004 19:05:51 -0000 1.1.1.1 +++ client/include/c6.h 4 Oct 2004 17:56:50 -0000 @@ -17,7 +17,7 @@ typedef struct cscp_conn_struct cscp_con typedef struct cscp_line_struct cscp_line_t; typedef struct cscp_cmnd_struct cscp_cmnd_t; typedef struct cscp_resp_struct cscp_resp_t; -typedef ulong cscp_oid_t; +typedef unsigned long cscp_oid_t; /* * Connection Functions Index: client/php/Makefile =================================================================== RCS file: /cvs/proj/raq/cce/client/php/Makefile,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 Makefile --- client/php/Makefile 3 Oct 2004 19:05:53 -0000 1.1.1.1 +++ client/php/Makefile 4 Oct 2004 17:56:50 -0000 @@ -12,13 +12,13 @@ include ../../dynamic.mk CCEMODULE = cce-libcce all: - make -C src + $(MAKE) -C src clean: - make -C src clean + $(MAKE) -C src clean depend: install: - make -C src install - make -C class install + $(MAKE) -C src install + $(MAKE) -C class install Index: client/php/src/cce.c =================================================================== RCS file: /cvs/proj/raq/cce/client/php/src/cce.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 cce.c --- client/php/src/cce.c 3 Oct 2004 19:05:56 -0000 1.1.1.1 +++ client/php/src/cce.c 4 Oct 2004 17:56:51 -0000 @@ -41,6 +41,7 @@ function_entry ccephp_functions[] = { }; zend_module_entry ccephp_module_entry = { + STANDARD_MODULE_HEADER, "cce", /* Name */ ccephp_functions, /* Array of functions */ PHP_MINIT(ccephp), /* Init functions. */ @@ -788,12 +789,12 @@ get_handle( long index ) handle = (cce_handle_t *) zend_list_find(index, &type); if ( ! handle ) { - php_error(E_WARNING, "Index %d invalid", index); + php_error(E_WARNING, "Index %ld invalid", index); return NULL; } if ( type != handle_list ) { - php_error(E_WARNING, "Index %d was not of type %d", index, type); + php_error(E_WARNING, "Index %ld was not of type %d", index, type); return NULL; } Index: client/src/Makefile =================================================================== RCS file: /cvs/proj/raq/cce/client/src/Makefile,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 Makefile --- client/src/Makefile 3 Oct 2004 19:05:56 -0000 1.1.1.1 +++ client/src/Makefile 4 Oct 2004 17:56:51 -0000 @@ -58,8 +58,8 @@ install-libs: $(SHARED_LIB_FULL) install-headers: mkdir -p $(INCLUDEDIR) - install -o root -g root -m 644 ../include/c6.h $(INCLUDEDIR) - install -o root -g root -m 644 ../include/cce.h $(INCLUDEDIR) + install -o root -g wheel -m 644 ../include/c6.h $(INCLUDEDIR) + install -o root -g wheel -m 644 ../include/cce.h $(INCLUDEDIR) clean: $(RM) -f $(OBJS) $(STATIC_LIB) $(SHARED_LIB)* .depend Index: client/src/cce.c =================================================================== RCS file: /cvs/proj/raq/cce/client/src/cce.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 cce.c --- client/src/cce.c 3 Oct 2004 19:05:59 -0000 1.1.1.1 +++ client/src/cce.c 4 Oct 2004 17:56:54 -0000 @@ -287,7 +287,7 @@ cce_ret_success( cce_ret_t * ret ) int cce_ret_next_int( cce_ret_t * ret ) { - ulong ret_int; + unsigned long ret_int; if ( ret->data_type != OIDS ) { return 0; Index: client/src/ccelib_internal.h =================================================================== RCS file: /cvs/proj/raq/cce/client/src/ccelib_internal.h,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 ccelib_internal.h --- client/src/ccelib_internal.h 3 Oct 2004 19:06:00 -0000 1.1.1.1 +++ client/src/ccelib_internal.h 4 Oct 2004 17:56:54 -0000 @@ -10,6 +10,10 @@ #include #include +#ifndef EBADMSG +#define EBADMSG EFTYPE +#endif + extern int cce_debug_indent_; #define DINDENTN(n) do { cce_debug_indent_ += (n); } while (0) Index: codb/src/impl/lib/Makefile =================================================================== RCS file: /cvs/proj/raq/cce/codb/src/impl/lib/Makefile,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 Makefile --- codb/src/impl/lib/Makefile 3 Oct 2004 19:06:19 -0000 1.1.1.1 +++ codb/src/impl/lib/Makefile 4 Oct 2004 17:56:54 -0000 @@ -1,3 +1,9 @@ +ifeq ($(shell uname -s),FreeBSD) +BUILDDIR = fbsd +else +BUILDDIR = linux +endif + libdb.a: db.1.85.tar.gz patch.1.1 patch.1.2 patch.1.3 patch.1.4 tar -xzf db.1.85.tar.gz patch -p0 -d db.1.85/PORT/linux/ +#include + +#include + +#ifdef __DBINTERFACE_PRIVATE +#include +#endif + +#define RET_ERROR -1 /* Return values. */ +#define RET_SUCCESS 0 +#define RET_SPECIAL 1 + +#define MAX_PAGE_NUMBER 0xffffffff /* >= # of pages in a file */ +typedef u_int32_t pgno_t; +#define MAX_PAGE_OFFSET 65535 /* >= # of bytes in a page */ +typedef u_int16_t indx_t; +#define MAX_REC_NUMBER 0xffffffff /* >= # of records in a tree */ +typedef u_int32_t recno_t; + +/* Key/data structure -- a Data-Base Thang. */ +typedef struct { + void *data; /* data */ + size_t size; /* data length */ +} DBT; + +/* Routine flags. */ +#define R_CURSOR 1 /* del, put, seq */ +#define __R_UNUSED 2 /* UNUSED */ +#define R_FIRST 3 /* seq */ +#define R_IAFTER 4 /* put (RECNO) */ +#define R_IBEFORE 5 /* put (RECNO) */ +#define R_LAST 6 /* seq (BTREE, RECNO) */ +#define R_NEXT 7 /* seq */ +#define R_NOOVERWRITE 8 /* put */ +#define R_PREV 9 /* seq (BTREE, RECNO) */ +#define R_SETCURSOR 10 /* put (RECNO) */ +#define R_RECNOSYNC 11 /* sync (RECNO) */ + +typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; + +/* + * !!! + * The following flags are included in the dbopen(3) call as part of the + * open(2) flags. In order to avoid conflicts with the open flags, start + * at the top of the 16 or 32-bit number space and work our way down. If + * the open flags were significantly expanded in the future, it could be + * a problem. Wish I'd left another flags word in the dbopen call. + * + * !!! + * None of this stuff is implemented yet. The only reason that it's here + * is so that the access methods can skip copying the key/data pair when + * the DB_LOCK flag isn't set. + */ +#if UINT_MAX > 65535 +#define DB_LOCK 0x20000000 /* Do locking. */ +#define DB_SHMEM 0x40000000 /* Use shared memory. */ +#define DB_TXN 0x80000000 /* Do transactions. */ +#else +#define DB_LOCK 0x2000 /* Do locking. */ +#define DB_SHMEM 0x4000 /* Use shared memory. */ +#define DB_TXN 0x8000 /* Do transactions. */ +#endif + +/* Access method description structure. */ +typedef struct __db { + DBTYPE type; /* Underlying db type. */ + int (*close) __P((struct __db *)); + int (*del) __P((const struct __db *, const DBT *, u_int)); + int (*get) __P((const struct __db *, const DBT *, DBT *, u_int)); + int (*put) __P((const struct __db *, DBT *, const DBT *, u_int)); + int (*seq) __P((const struct __db *, DBT *, DBT *, u_int)); + int (*sync) __P((const struct __db *, u_int)); + void *internal; /* Access method private. */ + int (*fd) __P((const struct __db *)); +} DB; + +#define BTREEMAGIC 0x053162 +#define BTREEVERSION 3 + +/* Structure used to pass parameters to the btree routines. */ +typedef struct { +#define R_DUP 0x01 /* duplicate keys */ + u_long flags; + u_int cachesize; /* bytes to cache */ + int maxkeypage; /* maximum keys per page */ + int minkeypage; /* minimum keys per page */ + u_int psize; /* page size */ + int (*compare) /* comparison function */ + __P((const DBT *, const DBT *)); + size_t (*prefix) /* prefix function */ + __P((const DBT *, const DBT *)); + int lorder; /* byte order */ +} BTREEINFO; + +#define HASHMAGIC 0x061561 +#define HASHVERSION 2 + +/* Structure used to pass parameters to the hashing routines. */ +typedef struct { + u_int bsize; /* bucket size */ + u_int ffactor; /* fill factor */ + u_int nelem; /* number of elements */ + u_int cachesize; /* bytes to cache */ + u_int32_t /* hash function */ + (*hash) __P((const void *, size_t)); + int lorder; /* byte order */ +} HASHINFO; + +/* Structure used to pass parameters to the record routines. */ +typedef struct { +#define R_FIXEDLEN 0x01 /* fixed-length records */ +#define R_NOKEY 0x02 /* key not required */ +#define R_SNAPSHOT 0x04 /* snapshot the input */ + u_long flags; + u_int cachesize; /* bytes to cache */ + u_int psize; /* page size */ + int lorder; /* byte order */ + size_t reclen; /* record length (fixed-length records) */ + u_char bval; /* delimiting byte (variable-length records */ + char *bfname; /* btree file name */ +} RECNOINFO; + +#ifdef __DBINTERFACE_PRIVATE +/* + * Little endian <==> big endian 32-bit swap macros. + * M_32_SWAP swap a memory location + * P_32_SWAP swap a referenced memory location + * P_32_COPY swap from one location to another + */ +#define M_32_SWAP(a) { \ + u_int32_t _tmp = a; \ + ((char *)&a)[0] = ((char *)&_tmp)[3]; \ + ((char *)&a)[1] = ((char *)&_tmp)[2]; \ + ((char *)&a)[2] = ((char *)&_tmp)[1]; \ + ((char *)&a)[3] = ((char *)&_tmp)[0]; \ +} +#define P_32_SWAP(a) { \ + u_int32_t _tmp = *(u_int32_t *)a; \ + ((char *)a)[0] = ((char *)&_tmp)[3]; \ + ((char *)a)[1] = ((char *)&_tmp)[2]; \ + ((char *)a)[2] = ((char *)&_tmp)[1]; \ + ((char *)a)[3] = ((char *)&_tmp)[0]; \ +} +#define P_32_COPY(a, b) { \ + ((char *)&(b))[0] = ((char *)&(a))[3]; \ + ((char *)&(b))[1] = ((char *)&(a))[2]; \ + ((char *)&(b))[2] = ((char *)&(a))[1]; \ + ((char *)&(b))[3] = ((char *)&(a))[0]; \ +} + +/* + * Little endian <==> big endian 16-bit swap macros. + * M_16_SWAP swap a memory location + * P_16_SWAP swap a referenced memory location + * P_16_COPY swap from one location to another + */ +#define M_16_SWAP(a) { \ + u_int16_t _tmp = a; \ + ((char *)&a)[0] = ((char *)&_tmp)[1]; \ + ((char *)&a)[1] = ((char *)&_tmp)[0]; \ +} +#define P_16_SWAP(a) { \ + u_int16_t _tmp = *(u_int16_t *)a; \ + ((char *)a)[0] = ((char *)&_tmp)[1]; \ + ((char *)a)[1] = ((char *)&_tmp)[0]; \ +} +#define P_16_COPY(a, b) { \ + ((char *)&(b))[0] = ((char *)&(a))[1]; \ + ((char *)&(b))[1] = ((char *)&(a))[0]; \ +} +#endif + +__BEGIN_DECLS +DB *dbopen __P((const char *, int, int, DBTYPE, const void *)); + +#ifdef __DBINTERFACE_PRIVATE +DB *__bt_open __P((const char *, int, int, const BTREEINFO *, int)); +DB *__hash_open __P((const char *, int, int, const HASHINFO *, int)); +DB *__rec_open __P((const char *, int, int, const RECNOINFO *, int)); +void __dbpanic __P((DB *dbp)); +#endif +__END_DECLS +#endif /* !_DB_H_ */ Index: codb/src/txn/odb_txn_internal.h =================================================================== RCS file: /cvs/proj/raq/cce/codb/src/txn/odb_txn_internal.h,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 odb_txn_internal.h --- codb/src/txn/odb_txn_internal.h 3 Oct 2004 19:06:45 -0000 1.1.1.1 +++ codb/src/txn/odb_txn_internal.h 4 Oct 2004 17:56:55 -0000 @@ -13,6 +13,7 @@ #include #include #include +#include /* special OIDs */ #define ERROR_OID (0) Index: common/src/cce_debug_mask.c =================================================================== RCS file: /cvs/proj/raq/cce/common/src/cce_debug_mask.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 cce_debug_mask.c --- common/src/cce_debug_mask.c 3 Oct 2004 19:06:56 -0000 1.1.1.1 +++ common/src/cce_debug_mask.c 4 Oct 2004 17:56:56 -0000 @@ -6,7 +6,7 @@ */ #include -ulong cce_debug_mask = 0; +unsigned long cce_debug_mask = 0; int vflag = 0; int nologflag = 0; Index: common/src/csem.c =================================================================== RCS file: /cvs/proj/raq/cce/common/src/csem.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 csem.c --- common/src/csem.c 3 Oct 2004 19:06:56 -0000 1.1.1.1 +++ common/src/csem.c 4 Oct 2004 17:56:56 -0000 @@ -8,7 +8,7 @@ #include #include -#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) +#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || defined(__FreeBSD__) /* union semun is defined by including */ #else /* according to X/OPEN we have to define it ourselves */ Index: common/src/ud_socket.c =================================================================== RCS file: /cvs/proj/raq/cce/common/src/ud_socket.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 ud_socket.c --- common/src/ud_socket.c 3 Oct 2004 19:06:58 -0000 1.1.1.1 +++ common/src/ud_socket.c 4 Oct 2004 17:56:56 -0000 @@ -79,7 +79,9 @@ ud_accept(int listenfd, struct ucred *cr } len = sizeof(struct ucred); +#ifdef TODO getsockopt(newsock, SOL_SOCKET, SO_PEERCRED, cred, &len); +#endif /* TODO */ return newsock; } Index: common/src/boolparse/bool_parse.y =================================================================== RCS file: /cvs/proj/raq/cce/common/src/boolparse/bool_parse.y,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 bool_parse.y --- common/src/boolparse/bool_parse.y 3 Oct 2004 19:06:59 -0000 1.1.1.1 +++ common/src/boolparse/bool_parse.y 4 Oct 2004 17:56:56 -0000 @@ -42,7 +42,7 @@ static int booldbg = BOOL_DBG_DEFAULT; %% BooleanString: BoolExpr { root = $1; $$ = $1; } - | /* Empty */ = { $$ = NULL;} + | /* Empty */ { $$ = NULL;} ; BoolExpr: Index: cscp/src/cscp_fsm.c =================================================================== RCS file: /cvs/proj/raq/cce/cscp/src/cscp_fsm.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 cscp_fsm.c --- cscp/src/cscp_fsm.c 3 Oct 2004 19:07:07 -0000 1.1.1.1 +++ cscp/src/cscp_fsm.c 4 Oct 2004 17:57:00 -0000 @@ -202,7 +202,9 @@ setup_cscp_signals(struct sigaction *old act.sa_handler = SIG_IGN; sigemptyset(&act.sa_mask); act.sa_flags = 0; +#ifdef __linux__ act.sa_restorer = NULL; +#endif sigaction(SIGPIPE, &act, oldpipe); } Index: ed/src/handler_exec.c =================================================================== RCS file: /cvs/proj/raq/cce/ed/src/handler_exec.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 handler_exec.c --- ed/src/handler_exec.c 3 Oct 2004 19:07:25 -0000 1.1.1.1 +++ ed/src/handler_exec.c 4 Oct 2004 17:57:00 -0000 @@ -101,6 +101,7 @@ handler_exec(codb_handle *odb, cce_ed *e /* end of child process */ break; default: + break; } /* I am the big man, I use fd[0], huh! */ Index: include/ud_socket.h =================================================================== RCS file: /cvs/proj/raq/cce/include/ud_socket.h,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 ud_socket.h --- include/ud_socket.h 3 Oct 2004 19:07:32 -0000 1.1.1.1 +++ include/ud_socket.h 4 Oct 2004 17:57:01 -0000 @@ -7,6 +7,13 @@ #ifndef _CCE_UD_SOCKET_H_ #define _CCE_UD_SOCKET_H_ 1 +#ifdef __FreeBSD__ +#include +#define _WANT_UCRED +#include +#else +#define cr_uid uid +#endif #include #include Index: pam/pam_cce.c =================================================================== RCS file: /cvs/proj/raq/cce/pam/pam_cce.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 pam_cce.c --- pam/pam_cce.c 3 Oct 2004 19:07:33 -0000 1.1.1.1 +++ pam/pam_cce.c 4 Oct 2004 17:57:01 -0000 @@ -24,13 +24,16 @@ static const char rcsid[] = #ifndef LINUX_PAM #include + +#define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR +#define PAM_CONV_AGAIN PAM_TRY_AGAIN #endif /* LINUX_PAM */ static int _check_auth(char *user, char *pass) ; static void _pam_log(int err, const char *format, ...); static int _pam_parse(int argc, const char **argv); static int _read_password(pam_handle_t *pamh, unsigned int ctrl, - const char *prompt, const char **pass); + __restrict char *prompt, const char **pass); static int converse(pam_handle_t *pamh, int ctrl, int nargs, struct pam_message **message, struct pam_response **response); static char *_pam_delete(register char *xx); @@ -166,7 +169,7 @@ _pam_parse(int argc, const char **argv) } static int -_read_password( pam_handle_t *pamh, unsigned int ctrl, const char *prompt, +_read_password( pam_handle_t *pamh, unsigned int ctrl, __restrict char *prompt, const char **pass ) { int retval; Index: server/Makefile =================================================================== RCS file: /cvs/proj/raq/cce/server/Makefile,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 Makefile --- server/Makefile 3 Oct 2004 19:07:36 -0000 1.1.1.1 +++ server/Makefile 4 Oct 2004 17:57:02 -0000 @@ -5,7 +5,10 @@ include ../dynamic.mk DEFS += -DCCE_VERSION=\"$(CCE_VERSION)\" -LIBS += -lcrypt -ldl #-ldebug +LIBS += -lcrypt #-ldebug +ifeq ($(shell uname -s),Linux) +LIBS += -ldl +endif INCLUDES += -I./include SRCS = src/main.c src/smd.c @@ -40,7 +43,7 @@ test: all @echo TEST PASSED ../libcce_common.a: - make -C .. libcce_common.a + $(MAKE) -C .. libcce_common.a install: all @-mkdir -p $(CCE_SBINDIR) Index: server/src/main.c =================================================================== RCS file: /cvs/proj/raq/cce/server/src/main.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 main.c --- server/src/main.c 3 Oct 2004 19:07:37 -0000 1.1.1.1 +++ server/src/main.c 4 Oct 2004 17:57:02 -0000 @@ -268,7 +268,7 @@ handle_cmdline(int argc, char *argv[]) err = 1; break; } - *(ulong *)opts[i].flag = strtoul(argv[0], NULL, 0); + *(unsigned long *)opts[i].flag = strtoul(argv[0], NULL, 0); break; } else if (opts[i].type == OPT_LONG) { /* integer */ Index: server/src/smd.c =================================================================== RCS file: /cvs/proj/raq/cce/server/src/smd.c,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 smd.c --- server/src/smd.c 3 Oct 2004 19:07:38 -0000 1.1.1.1 +++ server/src/smd.c 4 Oct 2004 17:57:03 -0000 @@ -140,8 +140,13 @@ start_smd_thread(void) fcntl(newsock, F_SETFD, 1); /* format the credentials */ +#ifdef TODO snprintf(buf, sizeof(buf), "[%d:%d]", creds.uid, creds.pid); +#else + snprintf(buf, sizeof(buf), "[%d]", + creds.cr_uid); +#endif /* log it */ DPRINTF(DBG_SESSION, "client connection accepted from %s\n", buf); @@ -392,7 +397,7 @@ manage_session(int cli_fd, char *idstr, } /* root connections are magic */ - if (creds->uid == 0) { + if (creds->cr_uid == 0) { codb_handle_addflags(odbh, CODBF_ADMIN); CCE_SYSLOG("client %s has admin rights", idstr); } Index: test/Makefile =================================================================== RCS file: /cvs/proj/raq/cce/test/Makefile,v retrieving revision 1.1.1.1 diff -u -d -p -r1.1.1.1 Makefile --- test/Makefile 3 Oct 2004 19:07:40 -0000 1.1.1.1 +++ test/Makefile 4 Oct 2004 17:57:03 -0000 @@ -2,15 +2,15 @@ # Copyright 2001 Sun Microsystems, Inc. All rights reserved. test: - make -C alphabeta test - make -C baddata test - make -C sorting test -# maje -C magic_props test -# make -C security test + $(MAKE) -C alphabeta test + $(MAKE) -C baddata test + $(MAKE) -C sorting test +# $(MAKE) -C magic_props test +# $(MAKE) -C security test clean: - make -C alphabeta clean - make -C baddata clean - make -C sorting clean -# maje -C magic_props clean -# make -C security clean + $(MAKE) -C alphabeta clean + $(MAKE) -C baddata clean + $(MAKE) -C sorting clean +# $(MAKE) -C magic_props clean +# $(MAKE) -C security clean