You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(108) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(44) |
Feb
(87) |
Mar
(21) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-28 01:56:47
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv3750/src Modified Files: teklti.h Log Message: FIX: Incorrect documentation for _mktekuuid_t() Index: teklti.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/teklti.h,v retrieving revision 1.66 retrieving revision 1.67 diff -C 2 -d -p -r1.66 -r1.67 *** teklti.h 26 Feb 2007 20:41:28 -0000 1.66 --- teklti.h 28 Feb 2007 02:02:43 -0000 1.67 *************** extern char * teklti_find_userdbline_uid *** 1283,1292 **** /** ! * This function is used with the MKTEKUUID(str, raw) macro * to convert a string UUID into a binary UUID, usually for * comparisons. * * \warning It is not compatible to call this function ! * directly. Use the MKTEKUUID(str, raw) macro to call this * function. * --- 1283,1292 ---- /** ! * This function is used with the \ref GETTEKUUID macro * to convert a string UUID into a binary UUID, usually for * comparisons. * * \warning It is not compatible to call this function ! * directly. Use the \ref GETTEKUUID macro to call this * function. * *************** extern const char s[]; typedef teklti::i *** 1520,1523 **** --- 1520,1524 ---- #define TEKUUIDIMPORT_NS(s,i,a) } extern const char s[]; namespace teklti { #endif /* not TEKLTI_TRADITIONAL_C */ + #endif /* _cplusplus */ /** *************** extern const char s[]; typedef teklti::i *** 1529,1533 **** */ #define GETTEKUUID(name, ret) _mkuuid_t(name, ret); - #endif /* _cplusplus */ /* --- 1530,1533 ---- |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-28 00:29:13
|
Update of /cvsroot/libteklti/libteklti In directory planetsaphire.com:/tmp/cvs-serv32154 Modified Files: configure.in Log Message: ADD: Checks for rewind(), moved realloc() check. Index: configure.in =================================================================== RCS file: /cvsroot/libteklti/libteklti/configure.in,v retrieving revision 1.48 retrieving revision 1.49 diff -C 2 -d -p -r1.48 -r1.49 *** configure.in 27 Feb 2007 22:36:34 -0000 1.48 --- configure.in 28 Feb 2007 00:34:52 -0000 1.49 *************** AC_FUNC_LSTAT *** 293,296 **** --- 293,297 ---- AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MALLOC + AC_FUNC_REALLOC AC_CHECK_FUNC(calloc, MY_DEFINE(HAVE_CALLOC, calloc)) AC_CHECK_FUNC( *************** AC_CHECK_FUNC(mmap64, MY_DEFINE(HAVE_MMA *** 354,358 **** AC_CHECK_FUNC(munmap, MY_DEFINE(HAVE_MUNMAP, munmap)) AC_CHECK_FUNC(msync, MY_DEFINE(HAVE_MSYNC, msync)) ! AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES AC_FUNC_SETPGRP --- 355,359 ---- AC_CHECK_FUNC(munmap, MY_DEFINE(HAVE_MUNMAP, munmap)) AC_CHECK_FUNC(msync, MY_DEFINE(HAVE_MSYNC, msync)) ! AC_CHECK_FUNC(rewind, MY_DEFINE(HAVE_REWIND, rewind)) AC_FUNC_SELECT_ARGTYPES AC_FUNC_SETPGRP |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-27 22:30:59
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv22771/src Modified Files: aclunix.c Log Message: ADD: Little/Big Endian checks for the ACLs. Index: aclunix.c =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/aclunix.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C 2 -d -p -r1.2 -r1.3 *** aclunix.c 26 Feb 2007 20:41:28 -0000 1.2 --- aclunix.c 27 Feb 2007 22:36:35 -0000 1.3 *************** typedef struct _fileent *** 41,45 **** uint16_t _fileent_filename_unicode[256]; uint64_t _fileent_first_aceloc; ! uint8_t _fileent_empty[244]; } __fileent; --- 41,46 ---- uint16_t _fileent_filename_unicode[256]; uint64_t _fileent_first_aceloc; ! uuid_t _fileent_uuid; ! uint8_t _fileent_empty[228]; } __fileent; *************** typedef struct _aceent *** 50,54 **** uint64_t _aceent_perms; uint64_t _aceent_next_aceloc; ! uint8_t _aceent_empty[996]; } __aceent; --- 51,56 ---- uint64_t _aceent_perms; uint64_t _aceent_next_aceloc; ! uuid_t _aceent_uuid; ! uint8_t _aceent_empty[980]; } __aceent; *************** static int aclunix_isowner ( const char *** 97,100 **** --- 99,136 ---- + #ifdef TEKLTI_LITTLE_ENDIAN + static struct _ent * aclunix_tolendian ( struct _ent * s ) + { + uint8_t dst[sizeof(struct _ent)]; + uint8_t * sp; + uint16_t i; + + /* Let's convert the pointer into a uint8_t pointer. */ + sp = (uint8_t *)s; + sp += sizeof(struct _ent); + + /* Now we need to convert s to little endian. */ + for ( i=0; i < sizeof(struct _ent); i++ ) + { + /* Decrement sp. */ + sp--; + /* Copy over the byte. */ + dst[i] = *sp; + } + + /* Copy the final result and return to caller. */ + return (struct _ent *)memcpy(s, dst, sizeof(struct _ent)); + } + + static struct _ent * aclunix_tobendian ( struct _ent * s ) + { + return aclunix_tolendian(s); + } + #else /* not TEKLTI_LITTLE_ENDIAN */ + #define aclunix_tolendian(s) s + #define aclunix_tobendian(s) s + #endif /* not TEKLTI_LITTLE_ENDIAN */ + + aclunix_handle * aclunix_opendesc ( const char * desc, *************** int aclunix_closedesc ( aclunix_handle * *** 178,182 **** return 0; ! return aclunix_closedesc(handle); } --- 214,218 ---- return 0; ! return aclunix_closedesc_force(handle); } |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-27 22:30:56
|
Update of /cvsroot/libteklti/libteklti In directory planetsaphire.com:/tmp/cvs-serv22771 Modified Files: configure.in Log Message: ADD: Little/Big Endian checks for the ACLs. Index: configure.in =================================================================== RCS file: /cvsroot/libteklti/libteklti/configure.in,v retrieving revision 1.47 retrieving revision 1.48 diff -C 2 -d -p -r1.47 -r1.48 *** configure.in 26 Feb 2007 07:15:03 -0000 1.47 --- configure.in 27 Feb 2007 22:36:34 -0000 1.48 *************** sleep 5 *** 201,205 **** AM_CONFIG_HEADER(config.h) ! AC_LANG_CPLUSPLUS AC_PROG_CXX AC_C_VOLATILE --- 201,205 ---- AM_CONFIG_HEADER(config.h) ! AC_LANG_C AC_PROG_CXX AC_C_VOLATILE *************** AC_DISABLE_STATIC *** 207,213 **** AM_PROG_LIBTOOL - AC_HEADER_STDC AC_FUNC_CHOWN AC_FUNC_CLOSEDIR_VOID --- 207,285 ---- AM_PROG_LIBTOOL AC_HEADER_STDC + + # + # Check for the request to manually declare the system's + # byte order (little or big endian). We also check for + # the memcpy() function here. + # + AC_CHECK_FUNC( + memcpy, + MY_DEFINE(HAVE_MEMCPY, memcpy), + AC_MSG_ERROR([Your system needs memcpy for libTekLTI to work.]) + ) + + AC_ARG_ENABLE( + littleendian, + [ + --enable-littleendian instructs configure to configure libteklti + for running on a system that orders bytes + in little endian format. The --disable + flag is also accepted. (default=auto) + ], + littleendian=yes, + littleendian=no + ) + if test x$littleendian = xyes ; then + if test x$enable_littleendian = xno; then + AC_MSG_NOTICE([Big Endian byte mode is enabled.]) + else + AC_DEFINE( + [TEKLTI_LITTLE_ENDIAN], + 1, + [Define to 1 if your machine uses little endian byte order.] + ) + AC_MSG_NOTICE([Little Endian byte mode is enabled.]) + fi + else + AC_MSG_CHECKING([for endian byte order]) + + # + # Make the test file. + # + AC_LANG_CONFTEST( + [AC_LANG_PROGRAM([#include <string.h>], + [[const char test[4] = {'a', 'b', 'c', 'd'}; + unsigned int testi; + char testc; + memcpy(&testi, test, sizeof(unsigned int)); + memcpy(&testc, &testi, sizeof(char)); + if ( testc != 'a' ) + return 1; + return 0;]])]) + + # + # Make an executable out of it. + # + if $CC conftest.c -o conftest >&5 2>&5; then + if ./conftest >/dev/null 2>/dev/null; then + AC_MSG_RESULT([little]) + AC_DEFINE( + [TEKLTI_LITTLE_ENDIAN], + 1, + [Define to 1 if your machine uses little endian byte order.] + ) + else + AC_MSG_RESULT([big]) + fi + rm ./conftest >&5 2>&5 + else + AC_MSG_RESULT([refused to compile]) + AC_MSG_ERROR([Please read the --enable-littleendian flag info]) + fi + fi + + AC_FUNC_CHOWN AC_FUNC_CLOSEDIR_VOID *************** AC_LANG_CONFTEST( *** 242,256 **** return 0;]])]) # Make an executable out of it. # ! if $CXX conftest.cc -o conftest >&5 2>&5; then rm -f ./conftest.cc ./conftest.cpp >&5 2>&5 else ! if $CXX conftest.cpp -o conftest >&5 2>&5; then ! rm -f ./conftest.cc ./conftest.cpp >&5 2>&5 ! else ! AC_MSG_RESULT([no]) ! AC_MSG_ERROR([Your realloc() does not function properly.]) ! fi fi if ./conftest >&5 2>&5; then --- 314,325 ---- return 0;]])]) + # # Make an executable out of it. # ! if $CC conftest.c -o conftest >&5 2>&5; then rm -f ./conftest.cc ./conftest.cpp >&5 2>&5 else ! AC_MSG_RESULT([no]) ! AC_MSG_ERROR([Your realloc() does not function properly.]) fi if ./conftest >&5 2>&5; then *************** if ./conftest >&5 2>&5; then *** 258,261 **** --- 327,331 ---- AC_MSG_RESULT([yes]) else + rm ./conftest >&5 2>&5 AC_MSG_RESULT([no]) AC_MSG_ERROR([Your realloc() does not function properly.]) *************** AC_CHECK_HEADERS(sys/socket.h sys/ioctl. *** 324,328 **** --- 394,400 ---- AC_CHECK_FUNC(srandom, MY_DEFINE(HAVE_SRANDOM, srandom)) + AC_LANG_CPLUSPLUS AC_CHECK_HEADERS(stdexcept) + AC_LANG_C AC_TYPE_MODE_T *************** AC_CHECK_TYPES(int8_t) *** 392,396 **** ! AC_LANG(C++) --- 464,468 ---- ! AC_LANG_CPLUSPLUS |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-26 20:35:36
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv28729/src Modified Files: TekStd.cpp aclunix.c teklti.h Log Message: ADD: New functions TekStd*(). Index: aclunix.c =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/aclunix.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C 2 -d -p -r1.1 -r1.2 *** aclunix.c 26 Feb 2007 07:28:20 -0000 1.1 --- aclunix.c 26 Feb 2007 20:41:28 -0000 1.2 *************** aclunix_handle * aclunix_opendesc ( *** 106,109 **** --- 106,122 ---- char fopflags[3] = { 'r', '\0', '\0' }; + /* Did we get a filename to open? */ + if ( desc == NULL ) + { + /* Let's try to get the filename from environ. */ + desc = getenv("TEKLTI_ACLFILE"); + /* If the variable was not defined, nothing to do. */ + if ( desc == NULL ) + return NULL; + /* If the string is empty, nothing to do either. */ + if ( desc[0] == '\0' ) + return NULL; + } + /* Are we writing to the descriptor? */ if ( writing ) *************** aclunix_handle * aclunix_opendesc ( *** 123,139 **** } - /* Did we get a filename to open? */ - if ( desc == NULL ) - { - /* Let's try to get the filename from environ. */ - desc = getenv("TEKLTI_ACLFILE"); - /* If the variable was not defined, nothing to do. */ - if ( desc == NULL ) - return NULL; - /* If the string is empty, nothing to do either. */ - if ( desc[0] == '\0' ) - return NULL; - } - /* Try to allocate a new handle. */ retval = (aclunix_handle *)malloc(sizeof(aclunix_handle)); --- 136,139 ---- *************** aclunix_handle * aclunix_opendesc ( *** 151,155 **** /* Add a reference to the remoteuserdb. */ ! //TekStd_AddRef(remoteuserdb); /* Return the new handle to the caller. */ --- 151,155 ---- /* Add a reference to the remoteuserdb. */ ! TekStdAddRef(remoteuserdb); /* Return the new handle to the caller. */ *************** int aclunix_closedesc_force ( aclunix_ha *** 161,165 **** { /* Remove our reference to the remoteuserdb. */ ! //TekStd_Release(remoteuserdb); /* Free the handle from memory, and we're done. */ --- 161,165 ---- { /* Remove our reference to the remoteuserdb. */ ! TekStdRelease(handle->aclunix_handle_remoteuserdb); /* Free the handle from memory, and we're done. */ Index: TekStd.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/TekStd.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C 2 -d -p -r1.3 -r1.4 *** TekStd.cpp 10 Feb 2007 10:34:41 -0000 1.3 --- TekStd.cpp 26 Feb 2007 20:41:28 -0000 1.4 *************** *** 29,37 **** - #ifndef NULLTEST - #define NULLTEST (0) - #endif /* not NULLTEST */ - - MKTEKUUID(UTekStd, "567de9ac-d51c-11d9-871d-000bdbc434d9"); MKTEKDEBUGSTRING(DBTekStd, "TekStd"); --- 29,32 ---- *************** teklti::Std::~Std() *** 49,55 **** } - //#if NULLTEST != 0 - - //TEKSTD_SOURCE_FUNC(TekStd) unsigned int teklti::Std::AddRef() --- 44,47 ---- *************** TEKERR teklti::Std::CallFunc( *** 167,170 **** } ! //#endif /* NULL != 0 */ --- 159,199 ---- } ! ! TEKLTI_DECLSPEC int TekStdAddRef ( ! void * Instance ! ) ! { ! TekStd * InstanceP = reinterpret_cast<TekStd *>(Instance); ! ! return InstanceP->AddRef(); ! } ! ! TEKLTI_DECLSPEC TEKERR TekStdCheckFor( ! void * Instance, ! const uuid_t * UUIDArray, ! size_t UUIDArraySize, ! unsigned short Flags, ! void ** RetVal, ! unsigned int ** RefCountPtrRet ! ) ! { ! TekStd * InstanceP = reinterpret_cast<TekStd *>(Instance); ! ! return InstanceP->CheckFor( ! UUIDArray, ! UUIDArraySize, ! Flags, ! RetVal, ! RefCountPtrRet ! ); ! } ! ! TEKLTI_DECLSPEC int TekStdRelease ( ! void * Instance ! ) ! { ! TekStd * InstanceP = reinterpret_cast<TekStd *>(Instance); ! ! return InstanceP->Release(); ! } Index: teklti.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/teklti.h,v retrieving revision 1.65 retrieving revision 1.66 diff -C 2 -d -p -r1.65 -r1.66 *** teklti.h 26 Feb 2007 07:15:03 -0000 1.65 --- teklti.h 26 Feb 2007 20:41:28 -0000 1.66 *************** typedef unsigned long TEKERR; *** 731,735 **** #define TEKERR_ENUM_STOPPED 0x00020000 ! // ///// TEKERR CODES END ///// --- 731,741 ---- #define TEKERR_ENUM_STOPPED 0x00020000 ! /* ///// TEKERR CODES END ///// */ ! ! ! /* Let's define the variables for the C version of TekStd. */ ! #ifndef _cplusplus ! typedef void TekStd; ! #endif /* _cplusplus */ *************** The shell of the user. *** 1154,1157 **** --- 1160,1166 ---- + /* Temporarily define 'TekStd *' as a 'void *'. */ + #define TekStd void + /* Let's define our variables. */ *************** extern TEKERR TekStdCreateInstance ( *** 1226,1230 **** CPTekStdCIInput, size_t, ! void **, size_t, const uuid_t *, --- 1235,1239 ---- CPTekStdCIInput, size_t, ! TekStd **, size_t, const uuid_t *, *************** extern TEKERR TekStdGetGlobalVariables ( *** 1236,1239 **** --- 1245,1262 ---- struct TekStdGlobalVars * ); + extern int TekStdAddRef ( + TekStd * + ); + extern TEKERR TekStdCheckFor( + TekStd *, + const uuid_t *, + size_t, + unsigned short, + void **, + unsigned int ** + ); + extern int TekStdRelease ( + TekStd * + ); *************** TEKLTI_DECLSPEC TEKERR TekStdCreateInsta *** 1363,1367 **** CPTekStdCIInput InterfaceStructs, size_t InterfaceStructCount, ! void ** InstanceArray, size_t InstanceArrayCount, const uuid_t * UUIDArray, --- 1386,1390 ---- CPTekStdCIInput InterfaceStructs, size_t InterfaceStructCount, ! TekStd ** InstanceArray, size_t InstanceArrayCount, const uuid_t * UUIDArray, *************** TEKLTI_DECLSPEC TEKERR TekStdGetGlobalVa *** 1382,1385 **** --- 1405,1434 ---- ); + /** + * This function is the C equivalent to \ref teklti::Std::AddRef(). + */ + TEKLTI_DECLSPEC int TekStdAddRef ( + TekStd * Instance + ); + + /** + * This function is the C equivalent to \ref teklti::Std::CheckFor(). + */ + TEKLTI_DECLSPEC TEKERR TekStdCheckFor( + TekStd * Instance, + const uuid_t * UUIDArray, + size_t UUIDArraySize, + unsigned short Flags, + void ** RetVal, + unsigned int ** RefCountPtrRet + ); + + /** + * This function is the C equivalent to \ref teklti::Std::Release(). + */ + TEKLTI_DECLSPEC int TekStdRelease ( + TekStd * Instance + ); + #ifdef COMPILING_LIBTEKLTI *************** TEKLTI_DECLSPEC char * teklti_find_userd *** 1407,1413 **** --- 1456,1470 ---- + /* We can now undefine TekStd. */ + #undef TekStd + + #ifdef _cplusplus } + namespace teklti + { + #endif /* _cplusplus */ + #ifdef DOXYGEN_BUILD /** * \namespace teklti *************** TEKLTI_DECLSPEC char * teklti_find_userd *** 1416,1420 **** namespace teklti { ! #endif /* _cplusplus */ --- 1473,1477 ---- namespace teklti { ! #endif /* DOXYGEN_BUILD */ |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-26 19:49:41
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv15013/src Modified Files: TekStatFilePOSIX.cpp tekstatfileposix.h Log Message: FIX: MakeTekFile() is not global; TekStatFilePOSIX is final. Index: tekstatfileposix.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/tekstatfileposix.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C 2 -d -p -r1.5 -r1.6 *** tekstatfileposix.h 11 Feb 2007 00:30:05 -0000 1.5 --- tekstatfileposix.h 26 Feb 2007 19:55:04 -0000 1.6 *************** StatFilePOSIX(); *** 56,65 **** Retrieves information from named file. */ ! virtual TEKERR put_Filename(const uchar_t * Filename) = 0; /** Retrieves information from file descriptor. */ ! virtual TEKERR put_FILE(FILE * FileDescriptor) = 0; /** --- 56,65 ---- Retrieves information from named file. */ ! virtual TEKERR put_Filename(const uchar_t * Filename); /** Retrieves information from file descriptor. */ ! virtual TEKERR put_FILE(FILE * FileDescriptor); /** *************** virtual TEKERR put_FILE(FILE * FileDescr *** 75,79 **** is unavailable, a TEKERR_UNAVAILABLE will be returned. */ ! virtual TEKERR put_UserInfoToAccess(uuid_t * UUIDOfUserInfo) = 0; --- 75,79 ---- is unavailable, a TEKERR_UNAVAILABLE will be returned. */ ! virtual TEKERR put_UserInfoToAccess(uuid_t * UUIDOfUserInfo); *************** virtual TEKERR put_UserInfoToAccess(uuid *** 83,87 **** conditional blocks. */ ! virtual TEKERR MakeTekFile(FileType TekType, TekFile ** RetVal) = 0; --- 83,87 ---- conditional blocks. */ ! virtual TEKERR MakeTekFile(FileType TekType, TekFile ** RetVal); *************** virtual TEKERR MakeTekFile(FileType TekT *** 89,118 **** Retrieves the device. */ ! virtual TEKERR get_Dev(dev_t * Dev) = 0; /** Retrieves the device number. */ ! virtual TEKERR get_DevNo(dev_t * DevNo) = 0; /** Retrieves the file serial number. */ ! virtual TEKERR get_FileSerialNo(ino_t * SerialNo) = 0; /** Retrieves the raw mode. */ ! virtual TEKERR get_Mode(mode_t * FileMode) = 0; /** Retrieves the mode string. */ ! virtual TEKERR get_ModeString(uchar_t ** FileModeString) = 0; /** Sets the mode in raw form. */ ! virtual TEKERR put_Mode(mode_t NewFileMode) = 0; /** --- 89,118 ---- Retrieves the device. */ ! virtual TEKERR get_Dev(dev_t * Dev); /** Retrieves the device number. */ ! virtual TEKERR get_DevNo(dev_t * DevNo); /** Retrieves the file serial number. */ ! virtual TEKERR get_FileSerialNo(ino_t * SerialNo); /** Retrieves the raw mode. */ ! virtual TEKERR get_Mode(mode_t * FileMode); /** Retrieves the mode string. */ ! virtual TEKERR get_ModeString(uchar_t ** FileModeString); /** Sets the mode in raw form. */ ! virtual TEKERR put_Mode(mode_t NewFileMode); /** *************** virtual TEKERR put_Mode(mode_t NewFileMo *** 120,219 **** be documented by the inheriting interfaces. */ ! virtual TEKERR put_ModeString(const uchar_t * NewFileModeString) = 0; /** Retrieves the mode string. */ ! virtual TEKERR get_LinkCount(nlink_t * LinkCount) = 0; /** Retrieves the user ID in raw form. */ ! virtual TEKERR get_UID(uid_t * UID) = 0; /** Sets the user ID in raw form. */ ! virtual TEKERR put_UID(uid_t UID) = 0; /** Retrieves the group ID in raw form. */ ! virtual TEKERR get_GID(gid_t * GID) = 0; /** Sets the group ID in raw form. */ ! virtual TEKERR put_GID(gid_t GID) = 0; /** Retrieves the Username behind the UID. */ ! virtual TEKERR get_UIDString(uchar_t ** UIDString) = 0; /** Sets the Username. */ ! virtual TEKERR put_UIDString(const uchar_t * UIDString) = 0; /** Retrieves the Groupname behind the GID. */ ! virtual TEKERR get_GIDString(uchar_t ** GIDString) = 0; /** Sets the Groupname. */ ! virtual TEKERR put_GIDString(const uchar_t * GIDString) = 0; /** Retrieves the file size. */ ! virtual TEKERR get_Size(unsigned long * FileSize) = 0; /** Retrieves the file size, cast to a uint64_t. */ ! virtual TEKERR get_Size64(uint64_t * FileSize) = 0; /** Retrieves the block size to use for optimum performance. */ ! virtual TEKERR get_BlockSize(blksize_t * FileBlockSize) = 0; /** Retrieves the amount of blocks the file is taking. */ ! virtual TEKERR get_BlockCount(blkcnt64_t * FileBlockCount) = 0; /** Retrieves the time of last access to file, in raw form. */ ! virtual TEKERR get_TimeOfLastAccessRaw(unsigned long ** RetVal) = 0; /** Retrieves the time of last modification to file, in raw form. */ ! virtual TEKERR get_TimeOfLastModificationRaw(unsigned long ** RetVal) = 0; /** Retrieves the time of last stat change to file, in raw form. */ ! virtual TEKERR get_TimeOfLastStatChangeRaw(unsigned long ** RetVal) = 0; /** Retrieves the time of last access to file. */ ! virtual TEKERR get_TimeOfLastAccess(uchar_t ** RetVal) = 0; /** Retrieves the time of last modification to file. */ ! virtual TEKERR get_TimeOfLastModification(uchar_t ** RetVal) = 0; /** Retrieves the time of last stat change to file. */ ! virtual TEKERR get_TimeOfLastStatChange(uchar_t ** RetVal) = 0; }; --- 120,219 ---- be documented by the inheriting interfaces. */ ! virtual TEKERR put_ModeString(const uchar_t * NewFileModeString); /** Retrieves the mode string. */ ! virtual TEKERR get_LinkCount(nlink_t * LinkCount); /** Retrieves the user ID in raw form. */ ! virtual TEKERR get_UID(uid_t * UID); /** Sets the user ID in raw form. */ ! virtual TEKERR put_UID(uid_t UID); /** Retrieves the group ID in raw form. */ ! virtual TEKERR get_GID(gid_t * GID); /** Sets the group ID in raw form. */ ! virtual TEKERR put_GID(gid_t GID); /** Retrieves the Username behind the UID. */ ! virtual TEKERR get_UIDString(uchar_t ** UIDString); /** Sets the Username. */ ! virtual TEKERR put_UIDString(const uchar_t * UIDString); /** Retrieves the Groupname behind the GID. */ ! virtual TEKERR get_GIDString(uchar_t ** GIDString); /** Sets the Groupname. */ ! virtual TEKERR put_GIDString(const uchar_t * GIDString); /** Retrieves the file size. */ ! virtual TEKERR get_Size(unsigned long * FileSize); /** Retrieves the file size, cast to a uint64_t. */ ! virtual TEKERR get_Size64(uint64_t * FileSize); /** Retrieves the block size to use for optimum performance. */ ! virtual TEKERR get_BlockSize(blksize_t * FileBlockSize); /** Retrieves the amount of blocks the file is taking. */ ! virtual TEKERR get_BlockCount(blkcnt64_t * FileBlockCount); /** Retrieves the time of last access to file, in raw form. */ ! virtual TEKERR get_TimeOfLastAccessRaw(unsigned long ** RetVal); /** Retrieves the time of last modification to file, in raw form. */ ! virtual TEKERR get_TimeOfLastModificationRaw(unsigned long ** RetVal); /** Retrieves the time of last stat change to file, in raw form. */ ! virtual TEKERR get_TimeOfLastStatChangeRaw(unsigned long ** RetVal); /** Retrieves the time of last access to file. */ ! virtual TEKERR get_TimeOfLastAccess(uchar_t ** RetVal); /** Retrieves the time of last modification to file. */ ! virtual TEKERR get_TimeOfLastModification(uchar_t ** RetVal); /** Retrieves the time of last stat change to file. */ ! virtual TEKERR get_TimeOfLastStatChange(uchar_t ** RetVal); }; Index: TekStatFilePOSIX.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/TekStatFilePOSIX.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C 2 -d -p -r1.4 -r1.5 *** TekStatFilePOSIX.cpp 10 Feb 2007 10:34:41 -0000 1.4 --- TekStatFilePOSIX.cpp 26 Feb 2007 19:55:04 -0000 1.5 *************** TEKERR StatFilePOSIX::put_UserInfoToAcce *** 66,70 **** ! TEKERR MakeTekFile(FileType TekType, TekFile ** RetVal) { return TEKERR_NOTIMPL; --- 66,70 ---- ! TEKERR StatFilePOSIX::MakeTekFile(FileType TekType, TekFile ** RetVal) { return TEKERR_NOTIMPL; |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-26 07:22:27
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv30130/src Added Files: aclunix.c Log Message: ADD: New file aclunix.c. --- NEW FILE: aclunix.c --- |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-26 07:21:13
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv30085/src Modified Files: Makefile.am Log Message: REVERT: Incorrect Makefile.am was committed. Index: Makefile.am =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/Makefile.am,v retrieving revision 1.45 retrieving revision 1.46 diff -C 2 -d -p -r1.45 -r1.46 *** Makefile.am 26 Feb 2007 07:15:03 -0000 1.45 --- Makefile.am 26 Feb 2007 07:27:06 -0000 1.46 *************** *** 20,83 **** ! bin_PROGRAMS = tekltifrm ! ! check_PROGRAMS = ! tekltifrm_CXXFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI ! tekltifrm_CPPFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI tekltifrm_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI # ! # The below lines were commented out to avoid repeated -I's. ! # You may uncomment them as necessary. # - #tekltifrm_CPPFLAGS += $(UUID_INCLUDE_LOC) -DCOMPILING_LIBTEKLTI - #tekltifrm_CFLAGS += $(UUID_INCLUDE_LOC) -DCOMPILING_LIBTEKLTI - ! tekltifrm_SOURCES = uchar.c dbunixproc.c global.c \ ucharop.cpp \ ! TekStd.cpp TekEnum.cpp \ ! TekFile.cpp TekFileASCII.cpp TekFileBinary.cpp TekFileASCIIBare.cpp \ ! TekUser.cpp TekUserUnixRO.cpp TekUserUnixRW.cpp \ TekStatFile.cpp TekStatFilePOSIX.cpp \ ! TekUserDB.cpp TekUserDBUnix.cpp \ ! tekltifrm.cpp testsuite-err.cpp \ ! testsuite-tekfileasciibare.cpp testsuite-tekfilebinary.cpp \ ! testsuite-tekstd.cpp testsuite-tekuserdb.cpp ! # set the include path found by configure ! INCLUDES= $(all_includes) $(UUID_INCLUDE_LOC) ! # the library search path. ! tekltifrm_LDFLAGS = $(all_libraries) $(UUID_LOC) $(BZIP2LIB) ! noinst_HEADERS = teklti.h tekace.h tekstd.h tekacl.h tekenum.h \ ! tekstatfile.h tekstatfileposix.h \ ! tekuser.h tekuserunixro.h tekuserunixrw.h \ ! tekfile.h tekfileascii.h tekfileasciibare.h \ ! tekfilebinary.h \ ! tekuserdb.h tekuserdbunix.h \ ! testsuite.h if NOTEAL4 else ! tekltifrm_SOURCES += aclunix.c TekACE.cpp TekACL.cpp ! noinst_HEADERS += tekace.h tekacl.h endif if INCLBZ2 ! tekltifrm_SOURCES += TekFileBZ2.cpp TekFileBZ2ASCII.cpp \ ! TekFileBZ2Binary.cpp \ ! testsuite-tekfilebz2ascii.cpp \ ! testsuite-tekfilebz2binary.cpp ! noinst_HEADERS += tekfilebz2ascii.h tekfilebz2binary.h tekfilebz2.h endif - if USE386ASM - tekltifrm_SOURCES += TekFileASCIIBare.386.cpp TekFileBinary.386.cpp \ - dbunixproc.386.c uchar.386.c global386.c - noinst_HEADERS += teklti386.h - endif --- 20,119 ---- ! INCLUDES = $(all_includes) $(UUID_INCLUDE_LOC) $(BZIP2_INCLUDE_LOC) ! tekltifrm_CXXFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI -D_cplusplus tekltifrm_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI + libteklti_la_CXXFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI -D_cplusplus + libteklti_la_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI + + METASOURCES = AUTO + + lib_LTLIBRARIES = libteklti.la + check_PROGRAMS = tekltifrm + EXTRA_LTLIBRARIES = libextrasrc.la + libextrasrc_la_SOURCES = tekfilebz2.h TekFileBZ2.cpp testsuite.h \ + teklti386.h tekfilebz2ascii.h \ + tekfilebz2binary.h \ + aclunix.c TekACE.cpp tekace.h TekACL.cpp tekacl.h + tekltiincludedir = $(includedir) + aclocaldir = $(datadir)/aclocal + dist_aclocal_DATA = teklti.m4 + pcdir = $(libdir)/pkgconfig + pc_DATA = teklti.pc + TESTS = tekltifrm + + # ! # This first set is for the areas providing the main ! # functionality of libteklti. # ! libteklti_la_SOURCES = global.c uchar.c dbunixproc.c \ ucharop.cpp \ ! TekStd.cpp TekFile.cpp TekFileASCII.cpp \ ! TekFileASCIIBare.cpp TekFileBinary.cpp \ TekStatFile.cpp TekStatFilePOSIX.cpp \ ! TekEnum.cpp TekUser.cpp TekUserDB.cpp \ ! TekUserDBUnix.cpp ! tekltiinclude_HEADERS = teklti.h tekstd.h tekfile.h tekfilebinary.h \ ! tekfileascii.h tekfileasciibare.h tekenum.h \ ! tekstatfile.h tekstatfileposix.h tekuser.h tekuserdb.h \ ! tekuserdbunix.h \ ! tekltiver.h ! libteklti_la_SOURCES += TekUserUnixRO.cpp TekUserUnixRW.cpp ! tekltiinclude_HEADERS += tekuserunixro.h tekuserunixrw.h ! if USE386ASM ! libteklti_la_SOURCES += uchar.386.c global386.c dbunixproc.386.c \ ! TekFileBinary.386.cpp TekFileASCIIBare.386.cpp ! tekltiinclude_HEADERS += teklti386.h ! endif ! ! tekltifrm_SOURCES = testsuite-tekfileasciibare.cpp \ ! testsuite-tekfilebinary.cpp testsuite-tekstd.cpp \ ! tekltifrm.cpp testsuite-err.cpp testsuite-tekuserdb.cpp + noinst_HEADERS = testsuite.h + + + # + # This set defines the EAL-4 functionality. + # if NOTEAL4 else ! libteklti_la_SOURCES += aclunix.c TekACE.cpp TekACL.cpp ! tekltiinclude_HEADERS += tekace.h tekacl.h endif + + # + # This set defines the bzip2 functionality. + # + if INCLBZ2 ! libteklti_la_SOURCES += TekFileBZ2.cpp TekFileBZ2ASCII.cpp \ ! TekFileBZ2Binary.cpp ! tekltiinclude_HEADERS += tekfilebz2.h tekfilebz2ascii.h \ ! tekfilebz2binary.h ! tekltifrm_SOURCES += testsuite-tekfilebz2ascii.cpp \ ! testsuite-tekfilebz2binary.cpp endif + + # + # Define our LDFLAGS. + # + + libteklti_la_LDFLAGS = $(UUIDLIB) $(BZIP2LIB) + tekltifrm_LDFLAGS = $(UUIDLIB) $(BZIP2LIB) libteklti.la + + + # + # That's all folks. + # + |
From: Kevin M. <ke...@pl...> - 2007-02-26 07:09:32
|
Update of /cvsroot/libteklti/libteklti In directory planetsaphire.com:/tmp/cvs-serv29826 Modified Files: configure.in Log Message: ADD: Checks for limits.h, to support stat(). Index: configure.in =================================================================== RCS file: /cvsroot/libteklti/libteklti/configure.in,v retrieving revision 1.46 retrieving revision 1.47 diff -C 2 -d -p -r1.46 -r1.47 *** configure.in 23 Feb 2007 02:37:32 -0000 1.46 --- configure.in 26 Feb 2007 07:15:03 -0000 1.47 *************** fi *** 309,312 **** --- 309,313 ---- AC_CHECK_HEADERS(stdio.h) AC_CHECK_HEADERS(stdint.h inttypes.h) + AC_CHECK_HEADERS(limits.h) AC_CHECK_HEADERS(mathf.h) AC_CHECK_HEADERS(float.h) |
From: Kevin M. <ke...@pl...> - 2007-02-26 07:09:32
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv29826/src Modified Files: Makefile.am teklti.h Log Message: ADD: Checks for limits.h, to support stat(). Index: Makefile.am =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/Makefile.am,v retrieving revision 1.44 retrieving revision 1.45 diff -C 2 -d -p -r1.44 -r1.45 *** Makefile.am 25 Feb 2007 18:19:35 -0000 1.44 --- Makefile.am 26 Feb 2007 07:15:03 -0000 1.45 *************** *** 20,119 **** ! INCLUDES = $(all_includes) $(UUID_INCLUDE_LOC) $(BZIP2_INCLUDE_LOC) ! ! tekltifrm_CXXFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI -D_cplusplus ! tekltifrm_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI ! libteklti_la_CXXFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI -D_cplusplus ! libteklti_la_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI ! ! METASOURCES = AUTO ! ! lib_LTLIBRARIES = libteklti.la ! check_PROGRAMS = tekltifrm ! EXTRA_LTLIBRARIES = libextrasrc.la ! libextrasrc_la_SOURCES = tekfilebz2.h TekFileBZ2.cpp testsuite.h \ ! teklti386.h tekfilebz2ascii.h \ ! tekfilebz2binary.h \ ! TekACE.cpp tekace.h TekACL.cpp tekacl.h ! tekltiincludedir = $(includedir) ! aclocaldir = $(datadir)/aclocal ! dist_aclocal_DATA = teklti.m4 ! pcdir = $(libdir)/pkgconfig ! pc_DATA = teklti.pc ! TESTS = tekltifrm # ! # This first set is for the areas providing the main ! # functionality of libteklti. # ! libteklti_la_SOURCES = global.c uchar.c dbunixproc.c \ ucharop.cpp \ ! TekStd.cpp TekFile.cpp TekFileASCII.cpp \ ! TekFileASCIIBare.cpp TekFileBinary.cpp \ TekStatFile.cpp TekStatFilePOSIX.cpp \ ! TekEnum.cpp TekUser.cpp TekUserDB.cpp \ ! TekUserDBUnix.cpp ! tekltiinclude_HEADERS = teklti.h tekstd.h tekfile.h tekfilebinary.h \ ! tekfileascii.h tekfileasciibare.h tekenum.h \ ! tekstatfile.h tekstatfileposix.h tekuser.h tekuserdb.h \ ! tekuserdbunix.h \ ! tekltiver.h ! ! libteklti_la_SOURCES += TekUserUnixRO.cpp TekUserUnixRW.cpp ! ! tekltiinclude_HEADERS += tekuserunixro.h tekuserunixrw.h ! ! if USE386ASM ! libteklti_la_SOURCES += uchar.386.c global386.c dbunixproc.386.c \ ! TekFileBinary.386.cpp TekFileASCIIBare.386.cpp ! tekltiinclude_HEADERS += teklti386.h ! endif ! tekltifrm_SOURCES = testsuite-tekfileasciibare.cpp \ ! testsuite-tekfilebinary.cpp testsuite-tekstd.cpp \ ! tekltifrm.cpp testsuite-err.cpp testsuite-tekuserdb.cpp ! noinst_HEADERS = testsuite.h - # - # This set defines the EAL-4 functionality. - # if NOTEAL4 else ! libteklti_la_SOURCES += TekACE.cpp TekACL.cpp ! tekltiinclude_HEADERS += tekace.h tekacl.h endif - - # - # This set defines the bzip2 functionality. - # - if INCLBZ2 ! libteklti_la_SOURCES += TekFileBZ2.cpp TekFileBZ2ASCII.cpp \ ! TekFileBZ2Binary.cpp ! tekltiinclude_HEADERS += tekfilebz2.h tekfilebz2ascii.h \ ! tekfilebz2binary.h ! tekltifrm_SOURCES += testsuite-tekfilebz2ascii.cpp \ ! testsuite-tekfilebz2binary.cpp endif - - # - # Define our LDFLAGS. - # - - libteklti_la_LDFLAGS = $(UUIDLIB) $(BZIP2LIB) - tekltifrm_LDFLAGS = $(UUIDLIB) $(BZIP2LIB) libteklti.la - - - # - # That's all folks. - # - --- 20,83 ---- ! bin_PROGRAMS = tekltifrm + check_PROGRAMS = + tekltifrm_CXXFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI + tekltifrm_CPPFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI + tekltifrm_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI # ! # The below lines were commented out to avoid repeated -I's. ! # You may uncomment them as necessary. # + #tekltifrm_CPPFLAGS += $(UUID_INCLUDE_LOC) -DCOMPILING_LIBTEKLTI + #tekltifrm_CFLAGS += $(UUID_INCLUDE_LOC) -DCOMPILING_LIBTEKLTI ! ! tekltifrm_SOURCES = uchar.c dbunixproc.c global.c \ ucharop.cpp \ ! TekStd.cpp TekEnum.cpp \ ! TekFile.cpp TekFileASCII.cpp TekFileBinary.cpp TekFileASCIIBare.cpp \ ! TekUser.cpp TekUserUnixRO.cpp TekUserUnixRW.cpp \ TekStatFile.cpp TekStatFilePOSIX.cpp \ ! TekUserDB.cpp TekUserDBUnix.cpp \ ! tekltifrm.cpp testsuite-err.cpp \ ! testsuite-tekfileasciibare.cpp testsuite-tekfilebinary.cpp \ ! testsuite-tekstd.cpp testsuite-tekuserdb.cpp ! # set the include path found by configure ! INCLUDES= $(all_includes) $(UUID_INCLUDE_LOC) ! # the library search path. ! tekltifrm_LDFLAGS = $(all_libraries) $(UUID_LOC) $(BZIP2LIB) + noinst_HEADERS = teklti.h tekace.h tekstd.h tekacl.h tekenum.h \ + tekstatfile.h tekstatfileposix.h \ + tekuser.h tekuserunixro.h tekuserunixrw.h \ + tekfile.h tekfileascii.h tekfileasciibare.h \ + tekfilebinary.h \ + tekuserdb.h tekuserdbunix.h \ + testsuite.h if NOTEAL4 else ! tekltifrm_SOURCES += aclunix.c TekACE.cpp TekACL.cpp ! noinst_HEADERS += tekace.h tekacl.h endif if INCLBZ2 ! tekltifrm_SOURCES += TekFileBZ2.cpp TekFileBZ2ASCII.cpp \ ! TekFileBZ2Binary.cpp \ ! testsuite-tekfilebz2ascii.cpp \ ! testsuite-tekfilebz2binary.cpp ! noinst_HEADERS += tekfilebz2ascii.h tekfilebz2binary.h tekfilebz2.h endif + if USE386ASM + tekltifrm_SOURCES += TekFileASCIIBare.386.cpp TekFileBinary.386.cpp \ + dbunixproc.386.c uchar.386.c global386.c + noinst_HEADERS += teklti386.h + endif Index: teklti.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/teklti.h,v retrieving revision 1.64 retrieving revision 1.65 diff -C 2 -d -p -r1.64 -r1.65 *** teklti.h 25 Feb 2007 17:50:13 -0000 1.64 --- teklti.h 26 Feb 2007 07:15:03 -0000 1.65 *************** typedef int TEKPIPE[2]; *** 143,146 **** --- 143,155 ---- /* Include all of the other standard includes. */ + #ifdef HAVE_LIMITS_H + #include <limits.h> + #endif /* HAVE_LIMITS_H */ + + #ifndef PATH_MAX + /* PATH_MAX needs to be defined for us to compile okay. */ + #define PATH_MAX 255 + #endif /* not PATH_MAX */ + #ifdef HAVE_STDLIB_H #include <stdlib.h> *************** typedef int TEKPIPE[2]; *** 169,172 **** --- 178,185 ---- #endif /* HAVE_STDINT_H */ + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif /* HAVE_UNISTD_H */ + #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> *************** typedef int TEKPIPE[2]; *** 174,177 **** --- 187,194 ---- #endif /* not TEKLTI_DO_NOT_INCLUDE_SYS_HEADERS */ + #ifdef HAVE_SYS_TYPES_H + #include <sys/types.h> + #endif /* HAVE_SYS_TYPES_H */ + #if defined(HAVE_STDEXCEPT) && defined(_cplusplus) #include <stdexcept> |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 18:13:47
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv1510/src Modified Files: Makefile.am Log Message: REMOVE: Stray bzip2 headers in src Makefile. Index: Makefile.am =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/Makefile.am,v retrieving revision 1.43 retrieving revision 1.44 diff -C 2 -d -p -r1.43 -r1.44 *** Makefile.am 24 Feb 2007 22:02:53 -0000 1.43 --- Makefile.am 25 Feb 2007 18:19:35 -0000 1.44 *************** tekltiinclude_HEADERS = teklti.h tekstd. *** 61,65 **** tekstatfile.h tekstatfileposix.h tekuser.h tekuserdb.h \ tekuserdbunix.h \ - tekfilebz2.h tekfilebz2ascii.h tekfilebz2binary.h \ tekltiver.h --- 61,64 ---- |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 17:45:45
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv12867/src Modified Files: TekUserDBUnix.cpp testsuite-tekuserdb.cpp Log Message: CHANGE: Now Utilizing the *_TEKSTD macros on TekArrays. Index: TekUserDBUnix.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/TekUserDBUnix.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C 2 -d -p -r1.21 -r1.22 *** TekUserDBUnix.cpp 25 Feb 2007 07:50:00 -0000 1.21 --- TekUserDBUnix.cpp 25 Feb 2007 17:51:35 -0000 1.22 *************** TEKERR UserDBUnix::FindUsers( *** 749,753 **** { /* We're ready to initialize the array. */ ! INITTEKARRAY(1024, sizeof(TekUser *), NewVal); } --- 749,753 ---- { /* We're ready to initialize the array. */ ! INITTEKARRAY_TEKSTD(1024, NewVal); } Index: testsuite-tekuserdb.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/testsuite-tekuserdb.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C 2 -d -p -r1.10 -r1.11 *** testsuite-tekuserdb.cpp 25 Feb 2007 08:19:13 -0000 1.10 --- testsuite-tekuserdb.cpp 25 Feb 2007 17:51:35 -0000 1.11 *************** TekUserDBHunk1Fail: *** 383,387 **** #ifdef WINDOWS ! fprintf(stdout, "Skipping hunk 8"); sleep(1); #else /* not WINDOWS */ --- 383,387 ---- #ifdef WINDOWS ! fprintf(stdout, "Skipping hunk 9"); sleep(1); #else /* not WINDOWS */ *************** TekUserDBHunk1Fail: *** 394,398 **** { /* We ran out of memory. */ ! fprintf(stderr, "Can not allocate uchar_t in hunk 7!!!!!\n"); goto TekUserDBFatal; } --- 394,398 ---- { /* We ran out of memory. */ ! fprintf(stderr, "Can not allocate uchar_t in hunk 9!!!!!\n"); goto TekUserDBFatal; } *************** TekUserDBHunk1Fail: *** 403,407 **** if ( tekerr == TEKERR_OK ) { ! RELEASETEKARRAY(teka); PRINTPASS(bi, 9); } else { --- 403,407 ---- if ( tekerr == TEKERR_OK ) { ! RELEASETEKARRAY_TEKSTD(teka, tekstd); PRINTPASS(bi, 9); } else { |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 17:44:45
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv12831/src Modified Files: teklti.h Log Message: FIX: Segmentation violation in macro CLEARTEKARRAY_TEKSTD. Index: teklti.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/teklti.h,v retrieving revision 1.63 retrieving revision 1.64 diff -C 2 -d -p -r1.63 -r1.64 *** teklti.h 25 Feb 2007 06:55:14 -0000 1.63 --- teklti.h 25 Feb 2007 17:50:13 -0000 1.64 *************** REMOVETEKARRAYELEMENT(a, i, n) *** 1588,1594 **** #define CLEARTEKARRAY_TEKSTD(a, t) \ for ( a->TekArrayEnumLoc=0; a->TekArrayEnumLoc < a->TekArraySize; a->TekArrayEnumLoc++ ) \ { \ ! t = (TekStd *)a->TekArrayForEachMemoryLoc; \ t->Release(); \ a->TekArrayForEachMemoryLoc += a->TekArrayElementSize; \ --- 1588,1599 ---- #define CLEARTEKARRAY_TEKSTD(a, t) \ + a->TekArrayForEachMemoryLoc = a->TekArrayMemoryLoc; \ for ( a->TekArrayEnumLoc=0; a->TekArrayEnumLoc < a->TekArraySize; a->TekArrayEnumLoc++ ) \ { \ ! memcpy( \ ! (void *)&t, \ ! a->TekArrayForEachMemoryLoc, \ ! sizeof(TekStd *) \ ! ); \ t->Release(); \ a->TekArrayForEachMemoryLoc += a->TekArrayElementSize; \ |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 08:24:21
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv22609/src Modified Files: tekuserdbunix.h Log Message: UPDATE: Updated documentation to teklti::UserDBUnix. Index: tekuserdbunix.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/tekuserdbunix.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C 2 -d -p -r1.12 -r1.13 *** tekuserdbunix.h 25 Feb 2007 07:50:00 -0000 1.12 --- tekuserdbunix.h 25 Feb 2007 08:29:58 -0000 1.13 *************** Destructor. *** 57,60 **** --- 57,65 ---- /** Clones the current instance. + + \param[out] RetVal The return value of this function. + + \retval TEKERR_MEMORY If there was insufficient memory for cloning. + \retval TEKERR_FAIL If something else fails. */ virtual TEKERR Clone(TekEnum ** RetVal); *************** virtual TEKERR Clone(TekEnum ** RetVal); *** 62,70 **** /** For compatibility reasons, this function is not implemented. */ virtual TEKERR Back(void ** RetVal); /** ! Retrieves a particular element in the database, starting from 0. */ virtual TEKERR EnumNo(unsigned long ItemNo, void ** RetVal); --- 67,87 ---- /** For compatibility reasons, this function is not implemented. + + \param[out] RetVal The return value of this function. + + \retval TEKERR_NOTIMPL We do not implement the function for + \ref teklti::UserDBUnix. */ virtual TEKERR Back(void ** RetVal); /** ! Retrieves a particular element in the database ! ! \param[in] ItemNo An item number to retrieve, starting from 0. ! \param[out] RetVal The return value of this function. ! ! \retval TEKERR_ENUM_EOL If the item number does not exist. ! \retval TEKERR_DB_CORRUPT If the database is determined to be corrupted. ! \retval TEKERR_MEMORY If there was insufficient memory. */ virtual TEKERR EnumNo(unsigned long ItemNo, void ** RetVal); *************** virtual TEKERR EnumNo(unsigned long Item *** 72,75 **** --- 89,98 ---- /** Retrieves the next item in the database. + + \param[out] RetVal The return value of this function. + + \retval TEKERR_ENUM_EOL If the item number does not exist. + \retval TEKERR_DB_CORRUPT If the database is determined to be corrupted. + \retval TEKERR_MEMORY If there was insufficient memory. */ virtual TEKERR Next(void ** RetVal); *************** virtual TEKERR Next(void ** RetVal); *** 77,80 **** --- 100,105 ---- /** Resets the current item pointer. + + \retval TEKERR_FAIL If seeking to beginning of db fails. */ virtual TEKERR Reset(); *************** virtual TEKERR Reset(); *** 83,86 **** --- 108,117 ---- /** Opens the user database. + + \retval TEKERR_ACCESS If access is denied, even read-only. This + error rarely happens. + \retval TEKERR_UNAVAILABLE If the requested FileType is not + available on the system. + \retval TEKERR_FAIL If the function fails for any other reason. */ virtual TEKERR Open(); *************** virtual TEKERR Open(); *** 88,91 **** --- 119,125 ---- /** Closes the user database. + + \retval TEKERR_FILE_IO If an I/O error occured. + \retval TEKERR_FAIL If the function fails for any other reason. */ virtual TEKERR Close(); *************** virtual TEKERR Close(); *** 93,102 **** /** Writes everything to the user database. */ virtual TEKERR Flush(); /** ! Opens the user database and loads the database into a temporary file ! or directly into memory. */ virtual TEKERR OpenAndLoadAll(); --- 127,140 ---- /** Writes everything to the user database. + + \retval TEKERR_FILE_IO If an I/O error occured. + \retval TEKERR_FAIL If the function fails for any other reason. */ virtual TEKERR Flush(); /** ! This function is not implemented. ! ! \retval TEKERR_NOTIMPL This function is not implemented. */ virtual TEKERR OpenAndLoadAll(); *************** virtual TEKERR OpenAndLoadAll(); *** 104,108 **** /** Looks for a user in the opened user database by a UID. ! NOTE that this function is only available in TekUserDBUnix. */ TEKERR FindUserByUID(uid_t UserID, TekUser ** RetVal); --- 142,156 ---- /** Looks for a user in the opened user database by a UID. ! ! \param[in] UserID The User ID to look up. ! \param[out] RetVal The return value of this function. ! ! \note This function is only available on ! \ref teklti::UserDBUnix. ! ! \retval TEKERR_DB_NOSUCHENTRY If the requested entry was not found. ! \retval TEKERR_DB_CORRUPT If the database is determined to be corrupted. ! \retval TEKERR_MEMORY If there was insufficient memory. ! \retval TEKERR_FAIL If the function fails for any other reason. */ TEKERR FindUserByUID(uid_t UserID, TekUser ** RetVal); *************** TEKERR FindUserByUID(uid_t UserID, TekUs *** 110,113 **** --- 158,169 ---- /** Looks for a user in the opened user database. + + \param[in] Username The Username to look up. + \param[out] RetVal The return value of this function. + + \retval TEKERR_DB_NOSUCHENTRY If the requested entry was not found. + \retval TEKERR_DB_CORRUPT If the database is determined to be corrupted. + \retval TEKERR_MEMORY If there was insufficient memory. + \retval TEKERR_FAIL If the function fails for any other reason. */ virtual TEKERR FindUser(const uchar_t * Username, TekUser ** RetVal); *************** virtual TEKERR FindUsers( *** 160,163 **** --- 216,224 ---- Frees a UserInfoArray. This function should always be called to destroy the array. + + \todo This function is not yet implemented. It is also possible that + it will be removed from future prereleases of libTekLTI. + + \retval TEKERR_NOTIMPL This function is not implemented. */ virtual TEKERR FindUsersFree(TekUser ** UserInfoArray); *************** virtual TEKERR FindUsersFree(TekUser ** *** 165,168 **** --- 226,233 ---- /** Writes users in the opened user database from an array. + + \todo This function is not yet implemented. + + \retval TEKERR_NOTIMPL This function is not implemented. */ virtual TEKERR WriteUsers(TekUser ** UserInfoArray, unsigned long Count); *************** virtual TEKERR WriteUsers(TekUser ** Use *** 170,173 **** --- 235,242 ---- /** Writes a new user or updates one in the opened user database. + + \todo This function is not yet implemented. + + \retval TEKERR_NOTIMPL This function is not implemented. */ virtual TEKERR WriteUser(TekUser * UserInfo); *************** virtual TEKERR WriteUser(TekUser * UserI *** 175,178 **** --- 244,251 ---- /** Deletes a user from the opened user database. + + \todo This function is not yet implemented. + + \retval TEKERR_NOTIMPL This function is not implemented. */ virtual TEKERR DeleteUser(TekUser * UserInfo); *************** following:\n *** 214,217 **** --- 287,294 ---- - <b>0</b> - to stop the search and deletion.\n - <b>1</b> - to continue on with the search and deletion. + + \todo This function is not yet implemented. + + \retval TEKERR_NOTIMPL This function is not implemented. */ virtual TEKERR DeleteUsers( *************** filename, or fail. *** 228,231 **** --- 305,314 ---- \note If NewFilename is NULL, the Priv_Filename will be reset to NULL. + + \param[in] NewFilename The new filename to set to. + + \retval TEKERR_ACCESS If you try to set this parameter while + a descriptor is open in the instance. + \retval TEKERR_MEMORY If there is insufficient memory. */ virtual TEKERR put_Filename(const uchar_t * NewFilename); *************** virtual TEKERR put_Filename(const uchar_ *** 233,236 **** --- 316,323 ---- /** Retrieves the filename to access. + + \param[out] Filename The filename to read from. + + \retval TEKERR_MEMORY If there is insufficient memory. */ virtual TEKERR get_Filename(uchar_t ** Filename); *************** virtual TEKERR get_Filename(uchar_t ** F *** 238,241 **** --- 325,331 ---- /** Retrieves the read-only status of the entire User DB. + + \param[out] ReadOnlyStat The boolean value to set up with + the status bit. */ virtual TEKERR get_ReadOnly(bool * ReadOnlyStat); *************** Retrieves the uuid of the interface to a *** 247,250 **** --- 337,342 ---- to use get_GenericFileType first. It is more efficient in the long run, in most cases. + + \param[out] FileUUID The uuid_t to copy to. */ virtual TEKERR get_FileInterfaceUUID(uuid_t FileUUID); *************** virtual TEKERR get_FileInterfaceUUID(uui *** 252,265 **** /** Sets the uuid of the interface to access. */ virtual TEKERR put_FileInterfaceUUID(const uuid_t FileUUID); /** ! Retrieves the generic file type, if available. */ virtual TEKERR get_GenericFileType(FileType * CurrentFileType); /** ! Sets the generic file type, if allowed by the inheriting interface. */ virtual TEKERR put_GenericFileType(FileType CurrentFileType); --- 344,363 ---- /** Sets the uuid of the interface to access. + + \param[in] FileUUID The uuid_t to copy off of. */ virtual TEKERR put_FileInterfaceUUID(const uuid_t FileUUID); /** ! Retrieves the generic file type. ! ! \param[out] CurrentFileType The variable to copy to. */ virtual TEKERR get_GenericFileType(FileType * CurrentFileType); /** ! Sets the generic file type. ! ! \param[in] CurrentFileType The variable to copy from. */ virtual TEKERR put_GenericFileType(FileType CurrentFileType); |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 08:13:26
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv22193/src Modified Files: testsuite-tekuserdb.cpp Log Message: ADD: Initial Code to UserDBUnix::FindUsers(). Index: testsuite-tekuserdb.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/testsuite-tekuserdb.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C 2 -d -p -r1.9 -r1.10 *** testsuite-tekuserdb.cpp 25 Feb 2007 00:40:08 -0000 1.9 --- testsuite-tekuserdb.cpp 25 Feb 2007 08:19:13 -0000 1.10 *************** int runtekuserdbtests ( void ) *** 33,38 **** --- 33,40 ---- bool bi[NUM_OF_TEKUSERDB_HUNKS]; TekUserDBUnix * tekdbunix; + TekArray * teka; TekUserDB * tekdb; TekUser * tekuser; + TekStd * tekstd; FileType tektype; uchar_t * uchrt; *************** TekUserDBHunk1Fail: *** 284,287 **** --- 286,292 ---- PRINTFAIL(bi, 6, tekerr); } + + /* Dispose of this instance. */ + tekuser->Release(); } else { PRINTFAIL(bi, 6, tekerr); *************** TekUserDBHunk1Fail: *** 309,313 **** } ! /* Open the file. */ tekerr = tekdbunix->FindUser(uchrt, &tekuser); /* Destroy the contents. */ --- 314,318 ---- } ! /* Look for the user. */ tekerr = tekdbunix->FindUser(uchrt, &tekuser); /* Destroy the contents. */ *************** TekUserDBHunk1Fail: *** 330,333 **** --- 335,341 ---- PRINTFAIL(bi, 7, tekerr); } + + /* Dispose of this instance. */ + tekuser->Release(); } else { PRINTFAIL(bi, 7, tekerr); *************** TekUserDBHunk1Fail: *** 336,339 **** --- 344,414 ---- + /* -------------------- */ + /* --- HUNK 7 BEGIN --- */ + /* -------------------- */ + #ifdef WINDOWS + fprintf(stdout, "Skipping hunk 8"); + sleep(1); + #else /* not WINDOWS */ + PRINTHUNK(8, "Checking that the enumerators work"); + tekdbunix = (TekUserDBUnix *)tekdb; + + /* Perform an Enum Reset. */ + tekerr = tekdbunix->Reset(); + if ( tekerr != TEKERR_OK ) + { + PRINTFAIL(bi, 8, tekerr); + } else { + /* Try to retrieve the second entry. */ + if ( ( tekerr = tekdbunix->EnumNo(1, (void**)&tekuser) ) + == TEKERR_OK ) + { + /* Try to Clone the enumeration. */ + tekuser->Release(); + if ( ( tekerr = tekdbunix->Clone((TekEnum**)&tekstd) ) + == TEKERR_OK ) + { + /* Everything succeeded. */ + tekstd->Release(); + PRINTPASS(bi, 8); + } else { + PRINTFAIL(bi, 8, tekerr); + } + } else { + PRINTFAIL(bi, 8, tekerr); + } + } + #endif /* not WINDOWS */ + + + #ifdef WINDOWS + fprintf(stdout, "Skipping hunk 8"); + sleep(1); + #else /* not WINDOWS */ + PRINTHUNK(9, "Check to see if FindUsers() works"); + tekdbunix = (TekUserDBUnix *)tekdb; + + /* Create a uchar_t containing the phrase "Username="Root"". */ + uchrt = char2uchar("Username=\"root\""); + if ( uchrt == NULL ) + { + /* We ran out of memory. */ + fprintf(stderr, "Can not allocate uchar_t in hunk 7!!!!!\n"); + goto TekUserDBFatal; + } + + /* Go do the search. */ + tekerr = tekdb->FindUsers(uchrt, NULL, &teka); + ucharempty(uchrt); + if ( tekerr == TEKERR_OK ) + { + RELEASETEKARRAY(teka); + PRINTPASS(bi, 9); + } else { + PRINTFAIL(bi, 9, tekerr); + } + #endif /* not WINDOWS */ + + /* Let's close the database. */ tekerr = tekdb->Close(); |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 07:44:13
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv21615/src Modified Files: TekUserDBUnix.cpp tekuserdbunix.h Log Message: ADD: Initial Code to UserDBUnix::FindUsers(). Index: tekuserdbunix.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/tekuserdbunix.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C 2 -d -p -r1.11 -r1.12 *** tekuserdbunix.h 11 Feb 2007 00:30:05 -0000 1.11 --- tekuserdbunix.h 25 Feb 2007 07:50:00 -0000 1.12 *************** Destructor. *** 56,75 **** /** ! Clones the current enumeration. */ virtual TEKERR Clone(TekEnum ** RetVal); /** ! Goes backward by an element. */ virtual TEKERR Back(void ** RetVal); /** ! Retrieves a particular element in the enum. */ ! virtual TEKERR EnumNo(unsigned long ItemNo); /** ! Retrieves the next item in the enum. */ virtual TEKERR Next(void ** RetVal); --- 56,75 ---- /** ! Clones the current instance. */ virtual TEKERR Clone(TekEnum ** RetVal); /** ! For compatibility reasons, this function is not implemented. */ virtual TEKERR Back(void ** RetVal); /** ! Retrieves a particular element in the database, starting from 0. */ ! virtual TEKERR EnumNo(unsigned long ItemNo, void ** RetVal); /** ! Retrieves the next item in the database. */ virtual TEKERR Next(void ** RetVal); *************** virtual TEKERR FindUser(const uchar_t * *** 114,129 **** /** ! Looks for users in the opened user database matching the query string.\n ! \n ! Query format is standardized as follows:\n ! \n BOOLEAN syntax is used, so you may use AND and OR operators in the query, ! as well as the * wildcard.\n ! \n ! In addition, NULL characters will be accepted, so be careful with NULLs.\n ! \n Username=<i>username</i>\n ! <i>The username to look for. Use double quotes for usernames with spaces.</i>\n ! \n ID=<i>userid</i>\n <i>the user id to look for</i>\n --- 114,132 ---- /** ! Looks for users in the opened user database matching the query string. ! ! Query format is standardized as follows: ! BOOLEAN syntax is used, so you may use AND and OR operators in the query, ! as well as the * wildcard. ! ! In addition, NULL characters will be accepted, so be careful with NULLs. ! Username=<i>username</i>\n ! <i>The username to look for. Use double quotes for usernames with spaces. ! Also note that using "AND" on two usernames will yield an incorrect ! result. For instance, <b>Username=user1 AND Username=user2</b> is an ! example of such an invalid query.</i> ! ID=<i>userid</i>\n <i>the user id to look for</i>\n *************** There might be more supported by inherit *** 134,147 **** This function can call a user-defined callback function on every successful match, return an array of users, or both. However, this function will return ! TEKERR_POINTER if both FuncToCall and RetVal are NULL.\n ! \n The TekUserDBFunc callback implementation standard is:\n ! <b><i>int TekUserDBFunc(TekUser *) {}</i></b> The called function can view the TekUser * variable, and from there, decide what to do with it. However, the return value must be one of the ! following:\n ! \n - <b>0</b> - to stop the search.\n - <b>1</b> - to continue on with the search. */ virtual TEKERR FindUsers( --- 137,153 ---- This function can call a user-defined callback function on every successful match, return an array of users, or both. However, this function will return ! TEKERR_POINTER if both FuncToCall and RetVal are NULL. ! The TekUserDBFunc callback implementation standard is:\n ! <b><i>int TekUserDBFunc(TekUser *) {}</i></b>\n The called function can view the TekUser * variable, and from there, decide what to do with it. However, the return value must be one of the ! following: ! - <b>0</b> - to stop the search.\n - <b>1</b> - to continue on with the search. + + \bug This function can not check more than two items in a query. The + results are undefined until a developer chances by to fix this function. */ virtual TEKERR FindUsers( *************** virtual TEKERR put_GenericFileType(FileT *** 260,264 **** private: - DEFINETEKARRAY(Priv_Users); uuid_t Priv_UUID; FileType Priv_FileType; --- 266,269 ---- *************** private: *** 267,270 **** --- 272,276 ---- uchar_t Priv_Filename; uchar_t * Priv_TmpBuffer; + uint64_t Priv_EnumLoc; }; Index: TekUserDBUnix.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/TekUserDBUnix.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C 2 -d -p -r1.20 -r1.21 *** TekUserDBUnix.cpp 25 Feb 2007 00:40:08 -0000 1.20 --- TekUserDBUnix.cpp 25 Feb 2007 07:50:00 -0000 1.21 *************** UserDBUnix::UserDBUnix() *** 69,72 **** --- 69,74 ---- this->Priv_TmpBuffer = NULL; this->Priv_Flags = TEKUSERDBUNIX_PRIVFLAG_NONE; + /* Fourth, set the Enum Location to zero. */ + this->Priv_EnumLoc = 0; /* Finally, nullify the Priv_Filename. */ mkucharnull(this->Priv_Filename, 0); *************** UserDBUnix::UserDBUnix() *** 76,88 **** UserDBUnix::~UserDBUnix() { - TekStd * tekusr; - unsigned int n; - - /* Release our array as necessary. */ - if ( this->Priv_Users ) - { - RELEASETEKARRAY_TEKSTD(this->Priv_Users, n, tekusr); - } - /* Release our file descriptor. */ if ( this->Priv_FileDesc != NULL ) --- 78,81 ---- *************** UserDBUnix::~UserDBUnix() *** 98,102 **** TEKERR UserDBUnix::Clone(TekEnum ** RetVal) { ! return TEKERR_NOTIMPL; } --- 91,139 ---- TEKERR UserDBUnix::Clone(TekEnum ** RetVal) { ! #ifndef NO_SIZE_T_CHECKS ! if ( RetVal == NULL ) ! return TEKERR_POINTER; ! #endif /* NO_SIZE_T_CHECKS */ ! ! TekUserDBUnix * NewVal = new TekUserDBUnix; ! ! /* Copy the filename. */ ! if ( this->Priv_Filename.uchar_t_ascii != NULL ) ! { ! if ( NewVal->put_Filename(&this->Priv_Filename) != TEKERR_OK ) ! { ! delete NewVal; ! return TEKERR_MEMORY; ! } ! } ! ! /* Copy the interface UUID. */ ! if ( NewVal->put_FileInterfaceUUID(this->Priv_UUID) != TEKERR_OK ) ! { ! delete NewVal; ! return TEKERR_FAIL; ! } ! ! /* Copy the generic FileType. */ ! if ( NewVal->put_GenericFileType(this->Priv_FileType) != TEKERR_OK ) ! { ! delete NewVal; ! return TEKERR_FAIL; ! } ! ! /* Open the file if ours is open. */ ! if ( this->Priv_FileDesc != NULL ) ! { ! if ( NewVal->Open() != TEKERR_OK ) ! { ! delete NewVal; ! return TEKERR_FAIL; ! } ! } ! ! /* Setup the RetVal. */ ! *RetVal = dynamic_cast<TekEnum *>(NewVal); ! /* Return success to caller. */ ! return TEKERR_OK; } *************** TEKERR UserDBUnix::Back(void ** RetVal) *** 108,120 **** ! TEKERR UserDBUnix::EnumNo(unsigned long ItemNo) { ! return TEKERR_NOTIMPL; } TEKERR UserDBUnix::Next(void ** RetVal) { ! return TEKERR_NOTIMPL; } --- 145,272 ---- ! TEKERR UserDBUnix::EnumNo(unsigned long ItemNo, void ** RetVal) { ! unsigned long l; ! TEKERR terr; ! ! #ifndef NO_INTERNAL_NULL_CHECKS ! if ( this->Priv_FileDesc == NULL ) ! return TEKERR_SEQUENCE; ! #endif /* not NO_INTERNAL_NULL_CHECKS */ ! ! #ifndef NO_SIZE_T_CHECKS ! if ( RetVal == NULL ) ! return TEKERR_POINTER; ! #endif /* not NO_SIZE_T_CHECKS */ ! ! /* Seek to beginning of file. */ ! if ( ( terr = this->Priv_FileDesc->Seek(TekFileSeek_Begin, 0) ) ! != TEKERR_OK ) ! { ! return terr; ! } ! ! /* Let's enter into the loop. */ ! for ( l=0; l < ItemNo; l++ ) ! { ! /* Do a ReadLine(). */ ! terr = this->Priv_FileDesc->ReadLine( ! &this->Priv_TmpBuffer, ! TEKFILEASCII_STDBUFLEN); ! if ( terr != TEKERR_OK ) ! { ! if ( terr == TEKERR_FILE_EOF ) ! return TEKERR_ENUM_EOL; ! else ! return terr; ! } ! } ! ! /* We can call Next() to have the rest of the works done. */ ! return this->Next(RetVal); ! } ! ! ! /** ! * This is a private function, designed to create a TekUser object. ! */ ! inline static TekUser * TryMakeUser(char * buf) ! { ! struct TekUserInfo UInfo; ! TekUser * NewVal; ! TEKERR tekerr; ! ! /* Convert the result into a struct UserInfo. */ ! if ( teklti_retrieve_userdbline_results( ! buf, ! &UInfo) ! ) ! { ! /** ! DO NOT REMOVE THE CODE IN THE BELOW USE_386_ASM #IFDEF BLOCK! ! ! IT IS USED TO ALLOW GCC TO BYPASS A COMPILER REGRESSION. ! **/ ! #ifdef USE_386_ASM ! if ( buf == NULL ) ! { ! __asm__ ( " int $3 " ); ! } ! #endif /* USE_386_ASM */ ! return NULL; ! } ! ! /* Use the struct UserInfo to create a TekUser instance. */ ! tekerr = TekUserInfoCreate(&UInfo, &NewVal, TekUserType_Linux_RO); ! teklti_empty_userdbstruct(&UInfo); ! if ( tekerr != TEKERR_OK ) ! return NULL; ! ! /* Return the new value to caller. */ ! return NewVal; } + // + // END OF PRIVATE FUNCTION + // TEKERR UserDBUnix::Next(void ** RetVal) { ! TekUser * NewVal; ! TEKERR terr; ! ! #ifndef NO_INTERNAL_NULL_CHECKS ! if ( this->Priv_FileDesc == NULL ) ! return TEKERR_SEQUENCE; ! #endif /* not NO_INTERNAL_NULL_CHECKS */ ! ! #ifndef NO_SIZE_T_CHECKS ! if ( RetVal == NULL ) ! return TEKERR_POINTER; ! #endif /* not NO_SIZE_T_CHECKS */ ! ! /* Let's read the next line. */ ! terr = this->Priv_FileDesc->ReadLine( ! &this->Priv_TmpBuffer, ! TEKFILEASCII_STDBUFLEN); ! if ( terr != TEKERR_OK ) ! { ! if ( terr == TEKERR_FILE_EOF ) ! return TEKERR_ENUM_EOL; ! else ! return terr; ! } ! ! /* Preprocess the buffer. */ ! if ( teklti_process_userdbline(this->Priv_TmpBuffer->uchar_t_ascii) ) ! return TEKERR_DB_CORRUPT; ! /* Process the buffer into a TekUser. */ ! NewVal = TryMakeUser(this->Priv_TmpBuffer->uchar_t_ascii); ! if ( NewVal == NULL ) ! return TEKERR_MEMORY; ! ! /* Setup the RetVal and return to caller. */ ! *RetVal = NewVal; ! return TEKERR_OK; } *************** TEKERR UserDBUnix::Next(void ** RetVal) *** 122,126 **** TEKERR UserDBUnix::Reset() { ! return TEKERR_NOTIMPL; } --- 274,294 ---- TEKERR UserDBUnix::Reset() { ! TEKERR terr; ! ! /* Reset the EnumLoc. */ ! this->Priv_EnumLoc = 0; ! ! /* If we have an open file descriptor, rewind it. */ ! if ( this->Priv_FileDesc != NULL ) ! { ! if ( (terr = this->Priv_FileDesc->Seek(TekFileSeek_Begin, 0)) ! != TEKERR_OK ) ! { ! return terr; ! } ! } ! ! /* Return to caller. */ ! return TEKERR_OK; } *************** TEKERR UserDBUnix::OpenAndLoadAll() *** 259,306 **** - - /** - * This is a private function, designed to create a TekUser object. - */ - inline static TekUser * TryMakeUser(char * buf) - { - struct TekUserInfo UInfo; - TekUser * NewVal; - TEKERR tekerr; - - /* Convert the result into a struct UserInfo. */ - if ( teklti_retrieve_userdbline_results( - buf, - &UInfo) - ) - { - /** - DO NOT REMOVE THE CODE IN THE BELOW USE_386_ASM #IFDEF BLOCK! - - IT IS USED TO ALLOW GCC TO BYPASS A COMPILER REGRESSION. - **/ - #ifdef USE_386_ASM - if ( buf == NULL ) - { - __asm__ ( " int $3 " ); - } - #endif /* USE_386_ASM */ - return NULL; - } - - /* Use the struct UserInfo to create a TekUser instance. */ - tekerr = TekUserInfoCreate(&UInfo, &NewVal, TekUserType_Linux_RO); - teklti_empty_userdbstruct(&UInfo); - if ( tekerr != TEKERR_OK ) - return NULL; - - /* Return the new value to caller. */ - return NewVal; - } - // - // END OF PRIVATE FUNCTION - // - - TEKERR UserDBUnix::FindUser(const uchar_t * Username, TekUser ** RetVal) { --- 427,430 ---- *************** TEKERR UserDBUnix::FindUserByUID(uid_t U *** 444,447 **** --- 568,611 ---- + inline static int FindUsersGetResult ( + TekUserDBUnix * me, char * Op, void ** Op2 + ) + { + uchar_t * TmpStr2; + uchar_t TmpStr; + TekUser * UOp; + uid_t TmpUID; + + if ( Op = (char *)1 ) + { + TmpStr = (char *)*Op2; + free(*Op2); + if ( me->FindUser(&TmpStr, &UOp) != TEKERR_OK ) + return 0; + if ( UOp->get_Username(&TmpStr2) != TEKERR_OK ) + return 0; + *Op2 = UOp; + if ( strcmp(TmpStr2->uchar_t_ascii, TmpStr.uchar_t_ascii) == 0 ) + { ucharempty(TmpStr2); return 1; } + else + { ucharempty(TmpStr2); return 0; } + + } + TmpUID = (uid_t)*Op2; + if ( Op = (char *)2 ) + { + if ( me->FindUserByUID((uid_t)*Op2, &UOp) != TEKERR_OK ) + return 0; + if ( UOp->get_UserID(&TmpUID) != TEKERR_OK ) + return 0; + *Op2 = UOp; + if ( TmpUID == TmpUID ) + { return 1; } + else + { return 0; } + } + } + + TEKERR UserDBUnix::FindUsers( const uchar_t * SearchString, *************** TEKERR UserDBUnix::FindUsers( *** 450,454 **** ) { ! return TEKERR_NOTIMPL; } --- 614,927 ---- ) { ! DEFINETEKARRAY(TmpVal); ! DEFINETEKARRAY(NewVal); ! TekUser * TmpUsr; ! uid_t TmpUID, TmpUID2; ! uchar_t TmpStr; ! size_t TmpSize; ! char * TmpChr; ! char * Op; ! char * Op2; ! char * Op3; ! char * Op4; ! char * Op5; ! void * Opv; ! ! #ifndef NO_INTERNAL_NULL_CHECKS ! if ( this->Priv_FileDesc == NULL ) ! return TEKERR_SEQUENCE; ! #endif /* not NO_INTERNAL_NULL_CHECKS */ ! ! #ifndef NO_SIZE_T_CHECKS ! if ( SearchString == NULL ) ! return TEKERR_POINTER; ! #endif /* NO_SIZE_T_CHECKS */ ! ! /* We have to check for something valid to use. */ ! if ( ( FuncToCall == NULL ) && ( RetVal == NULL ) ) ! return TEKERR_POINTER; ! ! /* Set up the temporary string. */ ! TmpStr = SearchString; ! ! INITTEKARRAY(1024 * 3, sizeof(char *), TmpVal); ! ! /* Begin processing. */ ! TmpChr = TmpStr.uchar_t_ascii; ! Op = NULL; ! Op2 = NULL; ! Op3 = NULL; ! /* Enter the query processor pump. */ ! for ( TmpSize=0; TmpSize < TmpStr.uchar_t_asciilen; TmpSize++ ) ! { ! switch ((unsigned long)Op) ! { ! case 0: ! if ( TmpStr.uchar_t_ascii[TmpSize] == '=' ) ! { ! /* We hit an = sign. */ ! TmpStr.uchar_t_ascii[TmpSize] = '\0'; ! if ( strncasecmp(TmpChr, "Username", 8) == 0 ) ! { ! Op2 = (char *)1; ! ! } ! else if ( strncasecmp(TmpChr, "UserID", 6) == 0 ) ! { ! Op2 = (char *)2; ! } ! else ! { ! Op2 = (char *)0; ! } ! ADDTEKARRAYELEMENT(TmpVal, &Op2); ! Op = (char *)1; ! TmpChr = TmpStr.uchar_t_ascii + TmpSize + 1; ! /* Make sure we are not reading whitespace. */ ! while ( *TmpChr == ' ' ) ! TmpChr++; ! } ! break; ! case 1: ! if ( TmpStr.uchar_t_ascii[TmpSize] == '"' ) ! { ! TmpStr.uchar_t_ascii[TmpSize] = '\0'; ! if ( Op3 == (char *)2 ) ! { ; } ! else if ( Op3 == (char *)1 ) ! { ! if ( Op2 == (char *)2 ) ! { ! Op2 = (char *)strtoul(TmpChr, NULL, 0); ! Op = (char *)2; ! } ! else if ( Op2 == (char *)1 ) ! { ! Op2 = strdup(TmpChr); ! if ( Op2 == NULL ) ! { ! RELEASETEKARRAY(TmpVal); ! return TEKERR_MEMORY; ! } ! ADDTEKARRAYELEMENT(TmpVal, &Op2); ! Op = (char *)2; ! } else { ! Op = (char *)0; ! } ! Op3 = (char *)2; ! } else { ! TmpChr = TmpStr.uchar_t_ascii + ! TmpSize + 1; ! Op3 = (char *)1; ! } ! } ! break; ! case 2: ! if ( ( TmpStr.uchar_t_ascii[TmpSize] == 'A' ) || ! ( TmpStr.uchar_t_ascii[TmpSize] == 'a' ) ) ! { ! Op2 = (char *)1; ! ADDTEKARRAYELEMENT(TmpVal, &Op2); ! Op = (char *)3; ! } else ! if ( ( TmpStr.uchar_t_ascii[TmpSize] == 'O' ) || ! ( TmpStr.uchar_t_ascii[TmpSize] == 'o' ) ) ! { ! Op2 = (char *)2; ! ADDTEKARRAYELEMENT(TmpVal, &Op2); ! Op = (char *)3; ! } ! break; ! case 3: ! default: ! /* This is where we reset the operation counter. */ ! if ( TmpStr.uchar_t_ascii[TmpSize] == ' ' ) ! { ! TmpChr = TmpStr.uchar_t_ascii + ! TmpSize + 1; ! Op = (char *)0; ! } ! } ! } ! ! /* Do we need to initialize the RetVal array? */ ! if ( RetVal != NULL ) ! { ! /* We're ready to initialize the array. */ ! INITTEKARRAY(1024, sizeof(TekUser *), NewVal); ! } ! ! /* We are now ready to process the Temporary array. */ ! Op = (char *)0; ! Op2 = (char *)0; ! Op3 = (char *)0; ! Op4 = (char *)0; ! Op5 = (char *)0; ! TmpSize = 0; ! FOREACH_ELEMENT_IN_TEKARRAY(TmpVal, Opv); ! switch ( TmpSize ) ! { ! case 0: ! Op = (char *)Opv; ! TmpSize++; ! break; ! case 1: ! Op2 = (char *)Opv; ! TmpSize++; ! break; ! case 2: ! Op3 = (char *)Opv; ! TmpSize++; ! break; ! case 3: ! Op4 = (char *)Opv; ! TmpSize++; ! break; ! case 4: ! Op5 = (char *)Opv; ! TmpSize++; ! break; ! default: ! if ( Opv == (void *)1 ) ! { ! RELEASETEKARRAY(TmpVal); ! if ( RetVal != NULL ) ! { RELEASETEKARRAY(NewVal); } ! return TEKERR_FAIL; ! } ! ! if ( Opv == (void *)0 ) ! { ! RELEASETEKARRAY(TmpVal); ! if ( RetVal != NULL ) ! { RELEASETEKARRAY(NewVal); } ! return TEKERR_UNEXPECTED; ! } ! ! TmpSize = 0; ! } ! ENDFOR_TEKARRAY(); ! RELEASETEKARRAY(TmpVal); ! ! if ( ( TmpSize != 2 ) && ( TmpSize != 5 ) ) ! return TEKERR_FAIL; ! ! /* Straight word. */ ! if ( TmpSize == 2 ) ! { ! if ( FindUsersGetResult(this, Op, (void **)&Op2) == 1 ) ! { ! if ( FuncToCall != NULL ) ! { ! if ( FuncToCall((TekUser *)Op2) == 0 ) ! { ! if ( RetVal != NULL ) ! { ! ADDTEKARRAYELEMENT(NewVal, &Op2); ! } ! ! /* Set up the RetVal as appropriate. */ ! *RetVal = NewVal; ! return TEKERR_ENUM_STOPPED; ! } ! } ! if ( RetVal != NULL ) ! { ! ADDTEKARRAYELEMENT(NewVal, &Op2); ! } ! } ! } ! /* Word with OR or AND. */ ! if ( TmpSize == 5 ) ! { ! if ( FindUsersGetResult(this, Op, (void **)&Op2) == 1 ) ! { ! if ( Op3 == (char *)1 ) ! { ! if ( FindUsersGetResult( ! this, ! Op4, ! (void **)&Op5) == 1 ) ! { ! TmpUsr = (TekUser *)Op2; ! if ( TmpUsr->get_UserID(&TmpUID) != ! TEKERR_OK ) ! { ! *RetVal = NewVal; ! return TEKERR_UNEXPECTED; ! } ! TmpUsr = (TekUser *)Op5; ! if ( TmpUsr->get_UserID(&TmpUID2) != ! TEKERR_OK ) ! { ! *RetVal = NewVal; ! return TEKERR_UNEXPECTED; ! } ! if ( TmpUID == TmpUID2 ) ! { ! if ( FuncToCall((TekUser *)Op5) == 0 ) ! { ! if ( RetVal != NULL ) ! { ! ADDTEKARRAYELEMENT(NewVal, &Op5); ! } ! ! /* Set up the RetVal as appropriate. */ ! *RetVal = NewVal; ! return TEKERR_ENUM_STOPPED; ! } ! if ( RetVal != NULL ) ! { ! ADDTEKARRAYELEMENT(NewVal, &Op2); ! ADDTEKARRAYELEMENT(NewVal, &Op5); ! } ! } ! } ! } else { ! if ( FuncToCall((TekUser *)&Op2) == 0 ) ! { ! if ( RetVal != NULL ) ! { ! ADDTEKARRAYELEMENT(NewVal, &Op5); ! } ! ! /* Set up the RetVal as appropriate. */ ! *RetVal = NewVal; ! return TEKERR_ENUM_STOPPED; ! } ! if ( RetVal != NULL ) ! { ! ADDTEKARRAYELEMENT(TmpVal, &Op2); ! } ! ! if ( FindUsersGetResult( ! this, ! Op4, ! (void **)&Op5) == 1 ) ! { ! if ( FuncToCall((TekUser *)Op5) == 0 ) ! { ! if ( RetVal != NULL ) ! { ! ADDTEKARRAYELEMENT(NewVal, &Op5); ! } ! ! /* Set up the RetVal as appropriate. */ ! *RetVal = NewVal; ! return TEKERR_ENUM_STOPPED; ! } ! if ( RetVal != NULL ) ! { ! ADDTEKARRAYELEMENT(NewVal, &Op5); ! } ! } ! } ! } ! } ! ! /* Set up the RetVal as appropriate. */ ! *RetVal = NewVal; ! /* Return success to caller. */ ! return TEKERR_OK; } |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 07:42:50
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv21577/src Modified Files: tekenum.h tekuserdb.h Log Message: ADD: New variable to Enum::EnumNo() Index: tekenum.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/tekenum.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C 2 -d -p -r1.4 -r1.5 *** tekenum.h 11 Feb 2007 00:30:05 -0000 1.4 --- tekenum.h 25 Feb 2007 07:48:38 -0000 1.5 *************** Goes backward by an element. *** 65,69 **** Retrieves a particular element in the enum. */ ! virtual TEKERR EnumNo(unsigned long ItemNo) = 0; /** --- 65,69 ---- Retrieves a particular element in the enum. */ ! virtual TEKERR EnumNo(unsigned long ItemNo, void ** RetVal) = 0; /** Index: tekuserdb.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/tekuserdb.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C 2 -d -p -r1.13 -r1.14 *** tekuserdb.h 11 Feb 2007 00:30:05 -0000 1.13 --- tekuserdb.h 25 Feb 2007 07:48:38 -0000 1.14 *************** virtual TEKERR Back(void ** RetVal) = 0; *** 70,74 **** Retrieves a particular element in the enum. */ ! virtual TEKERR EnumNo(unsigned long ItemNo) = 0; /** --- 70,74 ---- Retrieves a particular element in the enum. */ ! virtual TEKERR EnumNo(unsigned long ItemNo, void ** RetVal) = 0; /** |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 06:49:28
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv18852/src Modified Files: teklti.h Log Message: FIX: Several buffer overruns in TekArray macros. Index: teklti.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/teklti.h,v retrieving revision 1.62 retrieving revision 1.63 diff -C 2 -d -p -r1.62 -r1.63 *** teklti.h 25 Feb 2007 05:13:32 -0000 1.62 --- teklti.h 25 Feb 2007 06:55:14 -0000 1.63 *************** typedef unsigned long TEKERR; *** 709,712 **** --- 709,717 ---- #define TEKERR_ENUM_EOL 0x00010000 + /** + * The for...each enumeration was stopped by a callback. + */ + #define TEKERR_ENUM_STOPPED 0x00020000 + // ///// TEKERR CODES END ///// *************** element aligned for TekStd-inheriting cl *** 1026,1032 **** number i from a.\n t is a TekStd * variable to borrow.\n ! <b>CLEARTEKARRAY_TEKSTD(a, n, t)</b> - Removes all TekStd elements from array a.\n - n is a unsigned long to use for the releasing.\n t is a TekStd * variable to borrow.\n <b>ADDREFTEKARRAY_TEKSTD(a)</b> - Adds a reference to a TekArray.\n --- 1031,1036 ---- number i from a.\n t is a TekStd * variable to borrow.\n ! <b>CLEARTEKARRAY_TEKSTD(a, t)</b> - Removes all TekStd elements from array a.\n t is a TekStd * variable to borrow.\n <b>ADDREFTEKARRAY_TEKSTD(a)</b> - Adds a reference to a TekArray.\n *************** Holds the location where the array is ac *** 1052,1055 **** --- 1056,1063 ---- uint8_t * TekArrayMemoryLoc; /** + Holds the location where the array is accessible in memory to for(). + */ + uint8_t * TekArrayForEachMemoryLoc; + /** Holds the maximum element number allowed in the array. */ *************** if ( ( t = (struct TekArray *)malloc(siz *** 1519,1522 **** --- 1527,1531 ---- { \ t->TekArrayAccessPoint = (uint8_t **)t->TekArrayMemoryLoc; \ + t->TekArrayElementSize = r; \ t->TekArraySize = t->TekArrayEnumLoc = 0; \ t->TekArrayMaxElements = s; \ *************** if ( ( t = (struct TekArray *)malloc(siz *** 1534,1543 **** #define ADDTEKARRAYELEMENT(a, e) \ if ( a->TekArraySize < a->TekArrayMaxElements ) { \ - a->TekArraySize++; \ memcpy( \ ! a->TekArrayAccessPoint[a->TekArraySize * a->TekArrayElementSize], \ (void *)e, \ a->TekArrayElementSize \ ); \ } --- 1543,1552 ---- #define ADDTEKARRAYELEMENT(a, e) \ if ( a->TekArraySize < a->TekArrayMaxElements ) { \ memcpy( \ ! a->TekArrayMemoryLoc + (a->TekArraySize * a->TekArrayElementSize), \ (void *)e, \ a->TekArrayElementSize \ ); \ + a->TekArraySize++; \ } *************** t->Release(); \ *** 1578,1586 **** REMOVETEKARRAYELEMENT(a, i, n) ! #define CLEARTEKARRAY_TEKSTD(a, n, t) \ ! for ( n=0; n <= a->TekArraySize; n++ ) \ { \ ! t = (TekStd *)a->TekArrayAccessPoint[n * sizeof(TekStd *)]; \ t->Release(); \ } \ CLEARTEKARRAY(a) --- 1587,1596 ---- REMOVETEKARRAYELEMENT(a, i, n) ! #define CLEARTEKARRAY_TEKSTD(a, t) \ ! for ( a->TekArrayEnumLoc=0; a->TekArrayEnumLoc < a->TekArraySize; a->TekArrayEnumLoc++ ) \ { \ ! t = (TekStd *)a->TekArrayForEachMemoryLoc; \ t->Release(); \ + a->TekArrayForEachMemoryLoc += a->TekArrayElementSize; \ } \ CLEARTEKARRAY(a) *************** if ( a->TekArrayRef == 0 ) \ *** 1599,1623 **** #define ADDREFTEKARRAY_TEKSTD(a) a->TekArrayRef++; ! #define RELEASETEKARRAY_TEKSTD(a, n, t) \ a->TekArrayRef--; \ if ( a->TekArrayRef == 0 ) \ { \ ! CLEARTEKARRAY_TEKSTD(a, n, t) \ free(a->TekArrayMemoryLoc); free(a); \ } #define FOREACH_ELEMENT_IN_TEKARRAY(a, i) \ ! for ( a->TekArrayEnumLoc=0; a->TekArrayEnumLoc <= a->TekArraySize; a++ ) \ { \ ! i = (void *)a->TekArrayAccessPoint[a->TekArrayEnumLoc * \ ! a->TekArrayElementSize]; #define FOREACH_TEKSTD_IN_TEKARRAY(a, i) \ ! for ( a->TekArrayEnumLoc=0; a->TekArrayEnumLoc <= a->TekArraySize; a++ ) \ { \ ! i = (void *)a->TekArrayAccessPoint[a->TekArrayEnumLoc * \ ! sizeof(TekStd *)]; \ ! if ( i == NULL ) \ ! break; #define ENDFOR_TEKARRAY(a) } --- 1609,1641 ---- #define ADDREFTEKARRAY_TEKSTD(a) a->TekArrayRef++; ! #define RELEASETEKARRAY_TEKSTD(a, t) \ a->TekArrayRef--; \ if ( a->TekArrayRef == 0 ) \ { \ ! CLEARTEKARRAY_TEKSTD(a, t) \ free(a->TekArrayMemoryLoc); free(a); \ } #define FOREACH_ELEMENT_IN_TEKARRAY(a, i) \ ! a->TekArrayForEachMemoryLoc = a->TekArrayMemoryLoc; \ ! for ( a->TekArrayEnumLoc=0; a->TekArrayEnumLoc < a->TekArraySize; a->TekArrayEnumLoc++ ) \ { \ ! memcpy( \ ! (void *)&i, \ ! a->TekArrayForEachMemoryLoc, \ ! a->TekArrayElementSize \ ! ); \ ! a->TekArrayForEachMemoryLoc += a->TekArrayElementSize #define FOREACH_TEKSTD_IN_TEKARRAY(a, i) \ ! a->TekArrayForEachMemoryLoc = a->TekArrayMemoryLoc; \ ! for ( a->TekArrayEnumLoc=0; a->TekArrayEnumLoc < a->TekArraySize; a->TekArrayEnumLoc++ ) \ { \ ! memcpy( \ ! (void *)&i, \ ! a->TekArrayForEachMemoryLoc, \ ! sizeof(TekStd *) \ ! ); \ ! a->TekArrayForEachMemoryLoc += sizeof(TekStd *) #define ENDFOR_TEKARRAY(a) } |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 05:07:50
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv12512/src Modified Files: teklti.h Log Message: FIX: Modernize INITTEKARRAY macro. Index: teklti.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/teklti.h,v retrieving revision 1.61 retrieving revision 1.62 diff -C 2 -d -p -r1.61 -r1.62 *** teklti.h 25 Feb 2007 03:24:51 -0000 1.61 --- teklti.h 25 Feb 2007 05:13:32 -0000 1.62 *************** for ( a->TekArrayEnumLoc=0; a->TekArrayE *** 1611,1617 **** { \ i = (void *)a->TekArrayAccessPoint[a->TekArrayEnumLoc * \ ! a->TekArrayElementSize]; \ ! if ( i == NULL ) \ ! break; #define FOREACH_TEKSTD_IN_TEKARRAY(a, i) \ --- 1611,1615 ---- { \ i = (void *)a->TekArrayAccessPoint[a->TekArrayEnumLoc * \ ! a->TekArrayElementSize]; #define FOREACH_TEKSTD_IN_TEKARRAY(a, i) \ |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 03:19:05
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv8968/src Modified Files: teklti.h Log Message: FIX: Modernize INITTEKARRAY macro. Index: teklti.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/teklti.h,v retrieving revision 1.60 retrieving revision 1.61 diff -C 2 -d -p -r1.60 -r1.61 *** teklti.h 25 Feb 2007 02:49:35 -0000 1.60 --- teklti.h 25 Feb 2007 03:24:51 -0000 1.61 *************** Holds the amount of references attatched *** 1067,1071 **** */ unsigned int TekArrayRef; ! }; --- 1067,1071 ---- */ unsigned int TekArrayRef; ! } _TekArray; *************** a->TekArraySize++; \ *** 1537,1541 **** memcpy( \ a->TekArrayAccessPoint[a->TekArraySize * a->TekArrayElementSize], \ ! e, \ a->TekArrayElementSize \ ); \ --- 1537,1541 ---- memcpy( \ a->TekArrayAccessPoint[a->TekArraySize * a->TekArrayElementSize], \ ! (void *)e, \ a->TekArrayElementSize \ ); \ |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 02:43:51
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv7059/src Modified Files: teklti.h Log Message: FIX: Modernize INITTEKARRAY macro. Index: teklti.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/teklti.h,v retrieving revision 1.59 retrieving revision 1.60 diff -C 2 -d -p -r1.59 -r1.60 *** teklti.h 24 Feb 2007 22:00:39 -0000 1.59 --- teklti.h 25 Feb 2007 02:49:35 -0000 1.60 *************** typedef unsigned long TEKERR; *** 704,707 **** --- 704,712 ---- #define TEKERR_NO_SUCH_FILE 0x00008000 + /** + * The TekEnum instance has reached the end of its list. + */ + #define TEKERR_ENUM_EOL 0x00010000 + // ///// TEKERR CODES END ///// *************** Holds the amount of references attatched *** 1062,1070 **** */ unsigned int TekArrayRef; ! /** ! ! */ ! TEKARRAY_MACRODEF; ! } _TekArray; --- 1067,1071 ---- */ unsigned int TekArrayRef; ! }; *************** typedef struct TekArray * PTekArray; *** 1512,1522 **** #define INITTEKARRAY(s, r, t) \ ! if ( ( t = (struct TekArray *)malloc(sizeof(struct _TekArray)) ) != NULL ) \ { \ ! if ( ( t->TekArrayAccessPoint = t->TekArrayMemoryLoc = \ (uint8_t *)calloc(s, r) ) != NULL ) \ { \ t->TekArraySize = t->TekArrayEnumLoc = 0; \ ! t->TekArrayMax = s; \ t->TekArrayRef = 1; \ } else { \ --- 1513,1524 ---- #define INITTEKARRAY(s, r, t) \ ! if ( ( t = (struct TekArray *)malloc(sizeof(struct TekArray)) ) != NULL ) \ { \ ! if ( ( t->TekArrayMemoryLoc = \ (uint8_t *)calloc(s, r) ) != NULL ) \ { \ + t->TekArrayAccessPoint = (uint8_t **)t->TekArrayMemoryLoc; \ t->TekArraySize = t->TekArrayEnumLoc = 0; \ ! t->TekArrayMaxElements = s; \ t->TekArrayRef = 1; \ } else { \ |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-25 00:34:25
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv2512/src Modified Files: TekUserDBUnix.cpp testsuite-tekuserdb.cpp Log Message: ADD: Code for UserDBUnix::FindUser(). Index: TekUserDBUnix.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/TekUserDBUnix.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C 2 -d -p -r1.19 -r1.20 *** TekUserDBUnix.cpp 24 Feb 2007 23:36:37 -0000 1.19 --- TekUserDBUnix.cpp 25 Feb 2007 00:40:08 -0000 1.20 *************** IT IS USED TO ALLOW GCC TO BYPASS A COMP *** 305,309 **** TEKERR UserDBUnix::FindUser(const uchar_t * Username, TekUser ** RetVal) { ! return TEKERR_NOTIMPL; } --- 305,372 ---- TEKERR UserDBUnix::FindUser(const uchar_t * Username, TekUser ** RetVal) { ! TekUser * NewVal; ! uchar_t uchrt(TEKUSERDBUNIX_STDBUFLEN + 1); ! TEKERR tekerr; ! unsigned int i, stop; ! ! #ifndef NO_INTERNAL_NULL_CHECKS ! if ( this->Priv_FileDesc == NULL ) ! return TEKERR_SEQUENCE; ! #endif /* not NO_INTERNAL_NULL_CHECKS */ ! ! #ifndef NO_SIZE_T_CHECKS ! if ( RetVal == NULL ) ! return TEKERR_POINTER; ! #endif /* not NO_SIZE_T_CHECKS */ ! ! /* Let's seek to the beginning of the file. */ ! tekerr = this->Priv_FileDesc->Seek(TekFileSeek_Begin, 0); ! if ( tekerr != TEKERR_OK ) ! return TEKERR_FAIL; ! ! /* Set the defaults. */ ! i = TEKFILEASCII_STDBUFLEN; ! stop = 0; ! ! tekerr = TEKERR_OK; ! /* Read the line. */ ! while ( ( tekerr = this->Priv_FileDesc->ReadLine(&uchrt, i) ) ! == TEKERR_OK ) ! { ! /* Break if we're full. */ ! if ( i < 1 ) ! { ! break; ! } ! ! /* Check to make sure the entry is valid. */ ! if ( teklti_process_userdbline(uchrt.uchar_t_ascii) ) ! return TEKERR_DB_CORRUPT; ! ! /* Find the username. */ ! if ( strcmp(uchrt.uchar_t_ascii, ! Username->uchar_t_ascii) == 0 ) ! { ! /* Attempt to create the user. */ ! NewVal = TryMakeUser(uchrt.uchar_t_ascii); ! if ( NewVal == NULL ) ! return TEKERR_MEMORY; ! ! /* Store the return value and return. */ ! *RetVal = NewVal; ! uchrt.Clear(); ! return TEKERR_OK; ! } ! } ! ! /* Make sure the error is only an EOF. */ ! if ( tekerr == TEKERR_FILE_EOF ) ! { ! if ( stop == 0 ) ! return TEKERR_DB_NOSUCHENTRY; ! } ! ! /* We encountered a more serious error. */ ! return tekerr; } Index: testsuite-tekuserdb.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/testsuite-tekuserdb.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C 2 -d -p -r1.8 -r1.9 *** testsuite-tekuserdb.cpp 11 Feb 2007 08:05:49 -0000 1.8 --- testsuite-tekuserdb.cpp 25 Feb 2007 00:40:08 -0000 1.9 *************** int runtekuserdbtests ( void ) *** 42,45 **** --- 42,46 ---- unsigned int i; unsigned int st; + uid_t tekuserid; /* NULLify the bi array first. */ *************** TekUserDBHunk1Fail: *** 271,275 **** if ( tekerr == TEKERR_OK ) { ! PRINTPASS(bi, 6); } else { PRINTFAIL(bi, 6, tekerr); --- 272,287 ---- if ( tekerr == TEKERR_OK ) { ! /* Let's do a paranoid check for the UserID. */ ! if ( ( tekerr = tekuser->get_UserID(&tekuserid)) == TEKERR_OK ) ! { ! if ( tekuserid == 2 ) ! { ! PRINTPASS(bi, 6); ! } else { ! PRINTFAIL(bi, 6, TEKERR_UNEXPECTED); ! } ! } else { ! PRINTFAIL(bi, 6, tekerr); ! } } else { PRINTFAIL(bi, 6, tekerr); *************** TekUserDBHunk1Fail: *** 278,281 **** --- 290,340 ---- + /* -------------------- */ + /* --- HUNK 7 BEGIN --- */ + /* -------------------- */ + #ifdef WINDOWS + fprintf(stdout, "Skipping hunk 7"); + sleep(1); + #else /* not WINDOWS */ + PRINTHUNK(7, "Find User 'mail'"); + tekdbunix = (TekUserDBUnix *)tekdb; + + /* Create a uchar_t containing the phrase "mail". */ + uchrt = char2uchar("mail"); + if ( uchrt == NULL ) + { + /* We ran out of memory. */ + fprintf(stderr, "Can not allocate uchar_t in hunk 7!!!!!\n"); + goto TekUserDBFatal; + } + + /* Open the file. */ + tekerr = tekdbunix->FindUser(uchrt, &tekuser); + /* Destroy the contents. */ + ucharempty(uchrt); + /* Check for error status. */ + if ( tekerr == TEKERR_OK ) + { + /* Let's do a paranoid check for the UserID. */ + if ( ( tekerr = tekuser->get_Username(&uchrt)) == TEKERR_OK ) + { + if ( strcmp(uchrt->uchar_t_ascii, "mail") == 0 ) + { + PRINTPASS(bi, 7); + } else { + PRINTFAIL(bi, 7, TEKERR_UNEXPECTED); + } + + ucharempty(uchrt); + } else { + PRINTFAIL(bi, 7, tekerr); + } + } else { + PRINTFAIL(bi, 7, tekerr); + } + #endif /* not WINDOWS */ + + + /* Let's close the database. */ tekerr = tekdb->Close(); if ( tekerr == TEKERR_OK ) |
From: Kevin's C. B. A. <kev...@pl...> - 2007-02-24 23:30:52
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv795/src Modified Files: TekUserDBUnix.cpp Log Message: UPDATE: Optimized UserDBUnix::FindUserByUID(). Index: TekUserDBUnix.cpp =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/TekUserDBUnix.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C 2 -d -p -r1.18 -r1.19 *** TekUserDBUnix.cpp 15 Feb 2007 11:08:48 -0000 1.18 --- TekUserDBUnix.cpp 24 Feb 2007 23:36:37 -0000 1.19 *************** TEKERR UserDBUnix::OpenAndLoadAll() *** 259,267 **** - TEKERR UserDBUnix::FindUser(const uchar_t * Username, TekUser ** RetVal) - { - return TEKERR_NOTIMPL; - } - /** --- 259,262 ---- *************** IT IS USED TO ALLOW GCC TO BYPASS A COMP *** 308,311 **** --- 303,312 ---- + TEKERR UserDBUnix::FindUser(const uchar_t * Username, TekUser ** RetVal) + { + return TEKERR_NOTIMPL; + } + + TEKERR UserDBUnix::FindUserByUID(uid_t UserID, TekUser ** RetVal) { *************** TEKERR UserDBUnix::FindUserByUID(uid_t U *** 326,329 **** --- 327,335 ---- #endif /* not NO_SIZE_T_CHECKS */ + /* Let's seek to the beginning of the file. */ + tekerr = this->Priv_FileDesc->Seek(TekFileSeek_Begin, 0); + if ( tekerr != TEKERR_OK ) + return TEKERR_FAIL; + /* Set the defaults. */ i = TEKFILEASCII_STDBUFLEN; *************** TEKERR UserDBUnix::FindUserByUID(uid_t U *** 369,382 **** return TEKERR_DB_NOSUCHENTRY; } - - uchrt.Clear(); - return tekerr; ! /* Trash the excessive memory we are now using. */ ! uchrt.Free(); ! ! /* Return to caller. */ ! *RetVal = NewVal; ! return TEKERR_OK; } --- 375,381 ---- return TEKERR_DB_NOSUCHENTRY; } ! /* We encountered a more serious error. */ ! return tekerr; } |
From: Kevin M. <ke...@pl...> - 2007-02-24 22:27:11
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv32182/src Modified Files: tekace.h Log Message: FIX: Incorrect variable type in documentation area. Index: tekace.h =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/tekace.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C 2 -d -p -r1.5 -r1.6 *** tekace.h 24 Feb 2007 19:45:14 -0000 1.5 --- tekace.h 24 Feb 2007 22:32:54 -0000 1.6 *************** class TekACE *** 88,92 **** * will be defined as a <i>void *</i>. */ ! TekUser * TekACE_UserInfo; #else /* not DOXYGEN_BUILD */ #ifdef _cplusplus --- 88,92 ---- * will be defined as a <i>void *</i>. */ ! teklti::User * TekACE_UserInfo; #else /* not DOXYGEN_BUILD */ #ifdef _cplusplus |
From: Kevin M. <ke...@pl...> - 2007-02-24 21:57:35
|
Update of /cvsroot/libteklti/libteklti/src In directory planetsaphire.com:/tmp/cvs-serv20624/src Modified Files: Makefile.am Log Message: ADD: Missing CXX flags for libteklti. Index: Makefile.am =================================================================== RCS file: /cvsroot/libteklti/libteklti/src/Makefile.am,v retrieving revision 1.42 retrieving revision 1.43 diff -C 2 -d -p -r1.42 -r1.43 *** Makefile.am 24 Feb 2007 19:48:03 -0000 1.42 --- Makefile.am 24 Feb 2007 22:02:53 -0000 1.43 *************** *** 22,27 **** INCLUDES = $(all_includes) $(UUID_INCLUDE_LOC) $(BZIP2_INCLUDE_LOC) ! tekltifrm_CPPFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI tekltifrm_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI METASOURCES = AUTO --- 22,29 ---- INCLUDES = $(all_includes) $(UUID_INCLUDE_LOC) $(BZIP2_INCLUDE_LOC) ! tekltifrm_CXXFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI -D_cplusplus tekltifrm_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI + libteklti_la_CXXFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI -D_cplusplus + libteklti_la_CFLAGS = -D_REENTRANT -DCOMPILING_LIBTEKLTI METASOURCES = AUTO |