Hi Roberto, They look good, specially the last one, will commit them soon.
Thanks, Rajiv Andrade IBM LTC Security Development On Thu, 2010-04-01 at 11:55 +0200, Roberto Sassu wrote: > Hi all > > i will post in this mail a set of patches which are bug fixes or > improvements for the tcsd code. > > The first patch (tcsd_thread_mutex_init_patch.diff) adds a call to mutex > initialization function in "tcsd_threads_init" for the "lock" field of > the allocated tcsd_thread_mgr structure. > > The second patch (tcsd_threads_leaks_patch.diff) does a better cleanup > if an error happens in the function "tcsd_thread_create". In particular > the "hostname" string may not be freed and the socket is not closed if > the functions THREAD_ATTR_INIT, THREAD_ATTR_SETJOINABLE or THREAD_CREATE > return an error. > Further, "data->hostname" in the function "tcsd_thread_run" is freed > even if "TCSD_SINGLE_THREAD_DEBUG" is defined since the pointer > assignment, in the function "tcsd_thread_create", is made in either cases. > > The last patch (pthread_portability_patch.diff) minimizes the effort to > port TrouSerS on Windows (please refer to previous mail sent by Giovanni > Cabiddu). The problem is that while in Linux the type "pthread_t" is > defined as "unsigned long int", in Windows it corresponds to a > structure. As consequence it is not possible for example, when compiling > the code for Windows, to compare the field "thread_id" of " > tcsd_thread_data" with THREAD_NULL. (which is equal to 0). > In this patch i modified the definition of the tcsd_thread_data > structure, by making the field "thread_id" as pointer and i inserted the > allocation/deallocation of the data (the proper size is given by > THREAD_TYPE). > In this way, finding an available slot in the array of > "tcsd_thread_data" structure will consist in verifying that "thread_id" > is NULL. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ TrouSerS-tech mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/trousers-tech ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ TrouSerS-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/trousers-tech
