1 2008-11-26 Corinna Vinschen <corinna@vinschen.de>
3 * Makefile.in (OBJS): Add setpwd.o.
4 * README: Explain new service to store passwords in the LSA registry
6 * bsd_helper.cc (get_token_info): Make externally available.
7 * bsd_helper.h (get_token_info): Declare.
8 * client.cc (client_request::handle_request): Add case for
9 CYGSERVER_REQUEST_SETPWD request.
10 * setpwd.cc: New file implementing the CYGSERVER_REQUEST_SETPWD
13 2008-10-30 Christopher Faylor <me+cygwin@cgf.cx>
15 * Makefile.in: Use -static-libgcc when creating cygserver.exe.
17 2008-04-30 Corinna Vinschen <corinna@vinschen.de>
19 * sysv_msg.cc: Add fix from upstream version 1.65.
20 (msgsnd): Call msleep with timeout value. Handle EWOULDBLOCK. Make
21 sure it's clear from where msleep has been called in debug output.
22 (msgrcv): Make sure it's clear from where msleep has been called in
25 2008-02-06 Corinna Vinschen <corinna@vinschen.de>
27 * bsd_helper.cc: Replace %E __small_printf format specifier with %lu
28 and call to GetLastError throughout.
29 * bsd_mutex.cc: Ditto.
30 * sysv_sem.cc (semget): Replace %X __small_printf format specifier
33 2008-02-06 Corinna Vinschen <corinna@vinschen.de>
35 Remove dependency from Cygwin internal code.
36 * Makefile.in (CYGWIN_OBJS): Remove smallprint.o.
37 (cygserver.exe): Remove strfuncs.o
38 (strfuncs.o): Drop rule.
39 * bsd_log.cc (_vlog): Use snprintf/vsnprintf instead of
40 __small_sprintf/__small_vsprintf.
41 * sysv_sem.cc (seminit): Use sys_malloc instead of malloc. Use
42 snprintf instead of __small_sprintf.
43 (semunload): Free the above allocated sema_mtx names here.
45 2008-02-03 Brian Dessent <brian@dessent.net>
47 * Makefile.in: Don't link strfuncs.o from the Cygwin build dir.
48 Build it again with __OUTSIDE_CYGWIN__ defined.
50 2007-11-05 Corinna Vinschen <corinna@vinschen.de>
52 * bsd_helper.cc (tunable_params): Add kern.ipc.shm_allow_removed as
54 * cygserver.conf: Add a description for the kern.ipc.shm_allow_removed
56 * sysv_shm.cc (shminit): Set shm_allow_removed variable according to
57 kern.ipc.shm_allow_removed setting.
59 2007-08-02 Corinna Vinschen <corinna@vinschen.de>
61 * smallprint.c: Remove.
63 2007-08-02 Christopher Faylor <me+cygwin@cgf.cx>
65 * Makefile.in: Add -lntdll to link line.
66 (CYGWIN_OBJS): Include strfuncs.o.
68 2007-08-02 Corinna Vinschen <corinna@vinschen.de>
70 * smallprint.c: New file.
71 * Makefile.in (OBJS): Add smallprint.o.
72 (CYGWIN_OBJS): Remove smallprint.o from Cygwin dir.
74 2007-07-21 Corinna Vinschen <corinna@vinschen.de>
76 * bsd_helper.cc: Drop unnecessary security.h include.
78 2007-02-23 Corinna Vinschen <corinna@vinschen.de>
80 Throughout remove using wincap.
81 * Makefile.in (OBJS): Remove wincap.o.
82 * README: Don't mention 9x.
83 * bsd_mutex.cc (_mtx_unlock): Drop checking for 9x error codes.
84 * cygserver.cc (server_submission_loop::request_loop): Add FIXME
88 * woutsup.h: Don't include wincap.h.
90 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
92 * Makefile.in (OBJS): Drop transport_sockets.o.
93 * sysv_shm.cc (shmget_allocate_segment): Remove spurious cast.
94 * transport.cc: Don't include transport_sockets.h.
95 (create_server_transport): Always create transport_layer_pipes.
96 * transport_sockets.cc: Remove.
97 * transport_sockets.h: Remove.
99 2006-05-24 Christopher Faylor <cgf@timesys.com>
101 * configure.in: Update to newer autoconf.
102 (thanks to Steve Ellcey)
103 * configure: Regenerate.
104 * aclocal.m4: New file.
106 2006-01-12 Corinna Vinschen <corinna@vinschen.de>
108 * wincap.cc: New file.
109 * wincap.h: New file.
110 * Makefile.in: Accomodate having our own wincap implementation now.
112 2006-01-09 Corinna Vinschen <corinna@vinschen.de>
114 Check FreeBSD upstream changes and apply important patches.
115 * sysv_sem.cc (__semctl): Check copyin return value (from 1.76).
116 * sysv_shm.cc (shminit): Actually use the iterating variable in the
117 for loop when trying to avoid overflow (from 1.102).
119 2005-11-10 Corinna Vinschen <corinna@vinschen.de>
121 * bsd_helper.cc (securityinit): New function. Move initialization
122 of security related variables from ipcinit here.
123 * bsd_helper.h (securityinit): Add prototype.
124 * cygserver.cc (main): Call securityinit right after wincap.init.
126 2005-11-10 Corinna Vinschen <corinna@vinschen.de>
128 * bsd_log.cc (_vpanic): LOG_EMERG is overkill, use LOG_CRIT.
130 2005-11-09 Corinna Vinschen <corinna@vinschen.de>
132 * process.cc (process_cache::process): Fix maximum process condition.
134 2005-10-24 Corinna Vinschen <corinna@vinschen.de>
136 * README: Add description for new -p/--process-cache option.
137 * bsd_helper.cc (default_tun_check): Add kern.srv.process_cache_size
138 entry to tunable_params. Set max value of kern.srv.request_threads
140 * cygserver.cc (SERVER_VERSION): Set to 1.20.
141 (print_usage): Print usage of new parameter -p.
142 (main): Add process cache parameter handling. Accomodate new max
143 value of request threads.
144 * cygserver.conf: Add kern.srv.process_cache_size tunable parameter.
145 Accomodate new max value of kern.srv.request_threads.
146 * process.cc: Fix a comment.
147 (process_cache::process_cache): Add max process cache size parameter.
148 Change _cache_add_trigger to manual reset event.
149 (struct pcache_wait_t): New struct used as parameter to
151 (pcache_wait_thread): New thread function used for threaded process
153 (process_cache::wait_for_processes): Use threaded waiting if number
154 of processes to wait for is bigger than 62. Always check all processes
155 to avoid race under heavy load.
156 (process_cache::sync_wait_array): Remove useless assert. Reset
157 _cache_add_trigger right at the start since it's manual reset now.
158 Accomodate threaded waiting.
159 * process.h (process_cache::process_cache): Add max_procs parameter.
160 (process_cache::_max_process_count): New member.
161 (process_cache::_wait_array: Raise to allow up to 5 wait threads.
162 (process_cache::_process_array): Ditto.
164 2005-08-08 Christopher Faylor <cgf@timesys.com>
166 * cygserver.cc (main): Call wincap.init() earlier to avoid a NULL
169 2005-06-14 Corinna Vinschen <corinna@vinschen.de>
171 * sysv_sem.cc (semu_list): Define static to avoid gcc 4.x compiler
174 2005-04-08 Corinna Vinschen <corinna@vinschen.de>
176 * bsd_mutex.cc (msleep_cnt): Remove.
177 (msleep_max_cnt): Remove.
178 (msleep_arr): Remove.
179 (class msleep_sync_array): New class to encapsulate msleep/wakeup
180 thread synchronization.
181 (msleep_sync): New object pointer.
182 (msleep_init): Initialize new msleep_sync object.
183 (_mutex): Just call msleep_sync->enter() and msleep_sync->leave() for
184 thread synchronization. Improve debug output a bit more.
185 (wakeup): Just call msleep_sync->wakeup().
186 (wakeup_all): Whitespace fix.
188 2005-04-06 Corinna Vinschen <corinna@vinschen.de>
190 * bsd_helper.cc (ipcexit_hookthread): Fix whitespace and handle leak.
191 * bsd_mutex.cc: Include stdlib.h, sys/msg.h and sys/sem.h.
192 (mtx_init): Initialize lock counter to 0.
193 (_mtx_lock): Increment and log mutex lock counter.
194 (mtx_owned): Add winpid argument. Return true only if mutex is
195 actually owned by process winpid.
196 (_mtx_assert): Add winpid argument accordingly.
197 (_mtx_unlock): Log owner and lock count.
198 (MSLEEP_MUTEX): Remove.
200 (MSLEEP_EVENT): Ditto.
201 (msleep_event_name): Ditto.
202 (msleep_cs): New global critical section.
203 (msleep_cnt): New global variable indicating msleep record usage.
204 (msleep_max_cnt): New global variable indicating msleep record size.
205 (msleep_arr): New global pointer to msleep records.
206 (msleep_init): Initialize msleep_cs. Allocate msleep_arr array.
207 (_msleep): Rewrite using new msleep_cs/msleep_arr based thread
208 synchronization. Don't be shy with debug output.
209 (wakeup): Rewrite using new msleep_cs/msleep_arr based thread
211 * bsd_mutex.h (struct mtx): Add lock counter for better debugging.
212 (mtx_owned): Declare with winpid argument.
213 (_mtx_assert): Ditto.
214 (mtx_assert): Define with winpid argument.
215 * cygserver.cc (version): Remove.
216 (SERVER_VERSION): New define, decoupling server version information
217 from source code control system.
218 (print_version): Simplify printing server version.
219 * process.cc (process::process): Fix wrong bracketing (and handle leak).
220 (process::~process): Only try to close _signal_arrived if valid.
221 * sysv_sem.cc: Include sys/smallprint.h.
222 (semundo_clear): Define with additional struct thread pointer argument.
223 Accomodate throughout.
224 (SEMUNDO_LOCKASSERT): Define with winpid argument. Accomodate
226 (struct sem_undo): Define un_proc as pid_t on Cygwin. Accomodate
228 (seminit): Improve debugging by adding the semid to the mutex name.
229 (semget): Correctly print key value as 64 bit hex value in debug
231 (semexit_myhook): Remove Cygwin specific unlocking of mutexes owned
232 by exiting process. Keep semaphore global lock throughout whole
233 function to avoid races.
234 * sysv_shm.cc (GIANT_REQUIRED): Define empty on Cygwin. We know that
237 2005-04-01 Corinna Vinschen <corinna@vinschen.de>
239 * bsd_mutex.cc (_msleep): Whitespace fix.
240 * process.cc (process::process): Handle invalid signal_arrived values
243 2004-12-30 Corinna Vinschen <corinna@vinschen.de>
245 * bsd_mutex.cc: Include limits.h.
246 (MSLEEP_MUTEX): New define for third parameter to msleep_event_name.
248 (MSLEEP_EVENT): Ditto.
249 (msleep_event_name): Add third parameter to allow multiple
250 synchronization objects per ident.
251 (_msleep): Implement new synchronization technique to make sure
252 that all threads have been woken up by a corresponding wakeup call.
255 2004-10-18 Corinna Vinschen <corinna@vinschen.de>
257 * sysv_sem.cc: Redefine offsetof to circumvent build problems with
260 2004-10-04 Corinna Vinschen <corinna@vinschen.de>
262 * bsd_mutex.cc (_msleep): Simplify event creation. Revert change from
263 2004-08-24. It should be unnecessary now.
264 * msg.cc (client_request_msg::serve): Release process critical
265 section as early as possible.
266 * sem.cc (client_request_sem::serve): Ditto.
267 * shm.cc (client_request_shm::serve): Ditto.
268 * process.cc: Use hold and release method calls instead of
269 EnterCriticalSection/LeaveCriticalSection calls throughout.
270 * process.h (_hold): Rename from hold. Take filename and linenumber
271 parameter for logging. Define matching hold macro.
274 2004-10-01 Corinna Vinschen <corinna@vinschen.de>
276 * sysv_sem.cc: Update to FreeBSD version 1.69.
277 1.68: Reduce the overhead of semop() by using the kernel stack
278 instead of malloc'd memory to store the operations array if it
279 is small enough to fit.
280 1.69: Adjust the number of processes waiting on a semaphore properly
281 if we're woken up in the middle of sleeping.
283 2004-09-23 Corinna Vinschen <corinna@vinschen.de>
285 * sysv_shm.cc (kern_shmat): Avoid compiler warning.
287 2004-09-21 Corinna Vinschen <corinna@vinschen.de>
289 * sysv_shm.cc (vm_object_reference): remove Cygwin specific define.
290 (vm_map_find): Ditto.
291 (vm_map_inherit): Ditto.
292 (kern_shmat): On Cygwin, take shmaddr just as is. Don't call vm
293 system calls on Cygwin. Add comment.
295 2004-09-15 Corinna Vinschen <corinna@vinschen.de>
297 Fix copyright throughout.
298 Eliminate use of _impure_ptr outside Cygwin.
299 * bsd_helper.cc: Include errno.h instead of cygerrno.h.
300 * bsd_mutex.cc : Ditto.
302 * cygserver.cc: Ditto.
303 * process.cc: Don't build functions inside Cygwin. Don't include
304 cygerrno.h. Don't set errno.
305 * transport_pipes.cc (SET_ERRNO): New define. Use througout.
306 * transport_sockets.cc (SET_ERRNO): Ditto.
309 2004-09-06 Corinna Vinschen <corinna@vinschen.de>
311 * bsd_mutex.cc (_msleep): Disable resetting event object for now.
313 2004-08-31 Corinna Vinschen <corinna@vinschen.de>
315 * sysv_shm.cc (kern_shmat): Add debug_printf's.
317 2004-08-24 Corinna Vinschen <corinna@vinschen.de>
319 * bsd_mutex.cc (_msleep): Release process object while waiting.
321 2004-08-03 Corinna Vinschen <corinna@vinschen.de>
323 * transport.cc (transport_layer_base::~transport_layer_base): Resurrect.
324 * transport.h (transport_layer_base::~transport_layer_base): Ditto.
326 2004-07-30 Corinna Vinschen <corinna@vinschen.de>
328 * bsd_mutex.cc (_msleep): Reset event object and close it before
329 entering mutex. Turn order of conditional for better readability.
331 2004-07-26 Corinna Vinschen <corinna@vinschen.de>
333 * cygserver.conf: Describe relation between shmmaxpgs and SHMMAX.
335 2004-07-20 Corinna Vinschen <corinna@vinschen.de>
337 * bsd_helper.cc: Whitespace fixes.
338 * bsd_mutex.cc: Ditto.
340 2004-07-19 Corinna Vinschen <corinna@vinschen.de>
342 * transport.cc (transport_layer_base::~transport_layer_base): Remove.
343 * transport.h (transport_layer_base::~transport_layer_base): Ditto.
345 2004-07-19 Corinna Vinschen <corinna@vinschen.de>
347 * bsd_mutex.cc (win_priority): Actually calculate p from priority.
349 2004-06-03 Corinna Vinschen <corinna@vinschen.de>
351 * shm.cc (shmget): Explicitely set td_retval[0] to -1 on error.
353 2004-03-30 Corinna Vinschen <corinna@vinschen.de>
355 * sysv_shm.cc (shmget): Allow to retrieve shared memory segments
356 by shmid when IPC_KEY_IS_SHMID is set.
358 2004-03-02 Corinna Vinschen <corinna@vinschen.de>
360 * sysv_sem.cc (semundo_adjust): Check for process id instead of
361 process struct pointer, which isn't fixed under Cygwin.
362 (semexit_myhook): Ditto. Adjust debug print statements to print
363 Cygwin and Windows PIDs instead of process pointer under Cygwin.
365 2004-02-07 Corinna Vinschen <corinna@vinschen.de>
367 * bsd_mutex.cc (win_priority): Move to msleep helper function section.
368 (set_priority): Ditto. Fix formatting.
369 (_msleep): Cleanup obj formatting. Rearrange obj order.
371 2004-02-06 Corinna Vinschen <corinna@vinschen.de>
373 * bsd_mutex.cc (_msleep): Handle PCATCH using signal_arrived event.
374 * client.cc: Include sigproc.h.
375 * msg.cc (client_request_msg::serve): Accomodate third parameter to
377 * sem.cc (client_request_sem::serve): Ditto.
378 * shm.cc (client_request_shm::serve): Ditto.
379 * process.cc (process::process): Duplicate signal_arrived into
380 Cygserver process space.
381 (process::~process): Close _signal_arrived handle.
382 (process_cache::process): Add signal_arrived handling.
383 * process.h (process::process): Add signal_arrived parameter.
384 (process:signal_arrived): New read accessor.
385 (process:_signal_arrived): New member.
386 (process_cache::process): Add signal_arrived parameter.
388 2004-01-16 Corinna Vinschen <corinna@vinschen.de>
390 * process.h (cleanup_routine::~cleanup_routine): Make pure virtual
391 function to avoid miscompilation with certain versions of gcc.
392 * process.cc (cleanup_routine::~cleanup_routine): Remove.
394 2003-12-26 Christopher Faylor <cgf@redhat.com>
396 * Makefile.in (CFLAGS, CXXFLAGS): Remove unneeded include.
397 (CYGWIN_LIB): Delete.
398 (cygserver.exe target): Add -L$(cygwin_build) to the link line to force
399 linker to use build tree version of the library. Remove specific
400 inclusion of libcygwin.a from the link line.
402 2003-12-16 Corinna Vinschen <corinna@vinschen.de>
404 * bsd_helper.cc (tunable_params): Add entries for kern.ipc.msgmnb and
405 kern.ipc.msgtql. Raise max value for kern.ipc.msgseg to 65535.
406 * cygserver.conf: Add kern.ipc.msgmnb and kern.ipc.msgtql.
407 * sysv_msg.cc (msginit): Add TUNABLE_INT_FETCH call for
408 kern.ipc.msgmnb and kern.ipc.msgtql.
410 2003-11-26 Corinna Vinschen <corinna@vinschen.de>
412 * cygserver.cc (main): Move call to ipcinit() up before installing
414 * sysv_sem.cc: Update to FreeBSD version 1.67.
415 (seminit): Initialize semaphore sequence numbers to 0.
417 2003-11-26 Corinna Vinschen <corinna@vinschen.de>
419 * Makefile.in (CYGWIN_LIB): Variable pointing to libcygwin.a in
420 the parallel cygwin dir.
421 (cygserver.exe): Depend on and link against $CYGWIN_LIB.
423 2003-11-25 Christopher Faylor <cgf@redhat.com>
425 * Makefile.in (CXXFLAGS): Remove duplicate options handled in
428 2003-11-22 Corinna Vinschen <corinna@vinschen.de>
430 * msg.cc (client_request_msg::serve): Add default case to msgop switch.
431 * sem.cc (client_request_sem::serve): Add default case to semop switch.
432 * shm.cc (client_request_shm::serve): Add default case to shmop switch.
434 2003-11-21 Corinna Vinschen <corinna@vinschen.de>
436 * Makefile.in (install): Explicitely create directories. Install
437 README to $(prefix)/share/doc/Cygwin.
440 2003-11-21 Corinna Vinschen <corinna@vinschen.de>
442 * cygserver.cc (print_usage): Fix scrambled output.
444 2003-11-20 Corinna Vinschen <corinna@vinschen.de>
446 * cygserver-config: Slightly modify printed message.
448 2003-11-20 Corinna Vinschen <corinna@vinschen.de>
450 * Makefile.in (install): Install cygserver-config script to bindir.
451 * cygserver-config: New script.
453 2003-11-19 Corinna Vinschen <corinna@vinschen.de>
455 Don't use safe_new but new throughout. Fix copyright dates
457 * Makefile.in: Accomodate all new files and name changes.
458 Add a *.d dependency.
460 (etcdir): Drop in favor of more appropriate sysconfdir definition.
462 (CXXFLAGS): Add -MMD flag. Add SYSCONFDIR definition.
464 (install): Add action items.
465 (libclean): New target.
467 * bsd_helper.cc: New file.
468 * bsd_helper.h: Ditto.
471 * bsd_mutex.cc: Ditto.
472 * bsd_mutex.h: Ditto.
473 * client.cc: Rearrange to build as less as possible if
475 (client_request::handle_request): Add Message Queue and Semaphore
477 * cygserver.cc: Rearrange to build as less as possible if
478 __INSIDE_CYGWIN__. Use new debug/log/panic logging functions.
479 (DEF_CONFIG_FILE): New definition for configuration file. Use
482 (__cygserver__printf): Remove.
483 (client_request_attach_tty::serve): Return error if impersonation
485 (print_usage): Pump up help message.
486 (print_version): Add output of default configuration file.
487 (main): Accommodate new options. Allow overwrite of threading options
488 from config file. Call several new initialization functions. Drop
489 printing dots. Don't define SIGHANDLE inline.
490 * cygserver.conf: New file.
491 * cygserver_process.h: Rename to process.h.
492 * cygserver_transport.h: Rename to transport.h.
493 * cygserver_transport_pipes.h: Rename to transport_pipes.h.
494 * cygserver_transport_sockets.h: Rename to transport_sockets.h.
498 * sysv_msg.cc: New file, derived from FreeBSD version 1.52.
499 * sysv_sem.cc: New file, derived from FreeBSD version 1.66.
500 * sysv_shm.cc: New file, derived from FreeBSD version 1.89.
501 * threaded_queue.cc: Rearrange to build as less as possible if
503 * transport.cc (transport_layer_base::impersonate_client): Define bool.
504 (transport_layer_base::revert_to_self): Ditto.
505 * transport.h (transport_layer_base::impersonate_client): Declare bool.
506 (transport_layer_base::revert_to_self): Ditto.
507 * transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
508 Don't call init_security.
509 (init_security): Remove.
510 (transport_layer_pipes::accept): Use global sec_all_nih.
511 (transport_layer_pipes::connect): Ditto.
512 (transport_layer_pipes::impersonate_client): Define bool.
513 (transport_layer_pipes::revert_to_self): Ditt.
514 * transport_pipes.h (transport_layer_pipes::impersonate_client): Declare
516 (transport_layer_pipes::revert_to_self): Ditto.
517 * woutsup.h: Include bsd compatibility headers.
518 (SIGHANDLE): Add definition.
519 (__cygserver__printf): Remove definition.
520 (__noop_printf): Ditto.
521 (debug_printf): Define using debug.
522 (syscall_printf): Define using log.
523 (system_printf): Ditto.
524 Drop all other _printf definitions.
526 2003-10-22 Corinna Vinschen <corinna@vinschen.de>
528 Accomodate moving cygserver header files from cygwin/include/cygwin
529 to here and cygwin dir.
530 * Makefile.in (EXEEXT): Drop as unused.
531 (EXEEXT_FOR_BUILD): Ditto.
532 (all): Don't build libcygserver.a.
533 * cygserver_process.h: Moved from cygwin/include/cygwin to here.
534 * cygserver_transport.h: Ditto.
535 * cygserver_transport_pipes.h: Ditto.
536 * cygserver_transport_sockets.h: Ditto.
537 * ipc.h: Moved to ../cygwin and renamed to cygserver_ipc.h.
538 * shm.h: Moved to ../cygwin and renamed to cygserver_shm.h.
540 2003-08-30 Christopher Faylor <cgf@redhat.com>
545 2003-08-30 Christopher Faylor <cgf@redhat.com>
547 * threaded_queue.h: New file.
549 2003-08-25 Christopher Faylor <cgf@redhat.com>
551 * Makefile.in: Build libcygserver.a.
552 * client.cc: Rename allow_daemon to allow_server.
554 2003-07-25 Christopher Faylor <cgf@redhat.com>
556 * configure.in: Use 'install-sh -c'.
557 * configure: Regenerate.
559 2003-07-25 Christopher Faylor <cgf@redhat.com>
561 * configure.in: Always use install-sh.
562 * configure: Regenerate.
564 2003-07-01 Christopher Faylor <cgf@redhat.com>
566 * Makefile.in (OBJS): Move some more files from cygwin directory.
567 * woutsup.h: Define _MT_SAFE.
569 2003-07-01 Christopher Faylor <cgf@redhat.com>
571 * configure.in: First pass.
572 * Makefile.in: Ditto.
573 * configure: Generate.