Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2001-07-26Throughout, reorganize header file inclusion to put security.h prior toChristopher Faylor
fhandler.h. * fhandler.h (fhandler_base::get_inheritance): New method. * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper close-on-exec inheritance when creating. (fhandler_socket::check_peer_secret_event): Create handle as non-inheritable.
2001-07-16 * grp.cc: Add missing Copyright date 2001.Corinna Vinschen
2001-07-16 Change well_known_admin_sid to well_known_admins_sid throughout.Corinna Vinschen
* sec_acl.cc (setacl): Never set DELETE permission. Set FILE_DELETE_CHILD only on readable and executable directories. * sec_helper.cc: Add constructor for `well_known_null_sid'. * security.cc (get_nt_attribute): Set S_ISVTX for directories if FILE_WRITE_DATA and FILE_EXECUTE but not FILE_DELETE_CHILD is set. Add evaluation of S_ISVTX, S_ISGID and S_ISUID from NULL ACE. (alloc_sd): Never set DELETE permission. Set FILE_DELETE_CHILD only on readable and executable directories. Add creation of NULL ACE for S_ISVTX, S_ISGID and S_ISUID permissions. * security.h: Add extern declaration for `well_known_null_sid'.
2001-05-19* grp.cc (read_etc_group): Don't copy mutex on fork.Christopher Faylor
* pwd.cc (read_etc_passwd): Ditto. * autoload.cc (LoadDLLfuncEx): Use LoadDLLprime to initialize DLL specific area.
2001-05-15 * fork.cc (fork): Eliminate superfluous call to getuid().Corinna Vinschen
* security.h: New define `NO_SID'. Remove declarations of functions moved to methods into class cygsid. (class cygsid): Declare new methods `getfromstr', `get_sid', `getfrompw', `getfromgr', `get_rid', `get_uid', `get_gid', `string' and new constructors and operators =, == and !=. Declare new global cygsids `well_known_XXX_sid' substituting the corresponding `get_XXX_sid' functions. Remove declarations of these functions. * sec_helper.cc (well_known_admin_sid): New global variable. (well_known_system_sid): Ditto (well_known_creator_owner_sid): Ditto (well_known_world_sid): Ditto (cygsid::string): New method, substituting `convert_sid_to_string_sid'. (cygsid::get_sid): New method, substituting `get_sid'. (cygsid::getfromstr): New method, substituting `convert_string_sid_to_sid'. (cygsid::getfrompw): New method, substituting `get_pw_sid'. (cygsid::getfromgr): New method, substituting `get_gr_sid'. (cygsid::get_id): New method, substituting `get_id_from_sid'. (get_admin_sid): Eliminated. (get_system_sid): Ditto. (get_creator_owner_sid): Ditto. (get_world_sid): Ditto. * grp.cc: Use new cygsid methods and well known sids throughout. * registry.cc: Ditto. * sec_acl.cc: Ditto. * security.cc: Ditto. * shared.cc: Ditto. * syscalls.cc (seteuid): Ditto. Eliminate redundant conditional. * uinfo.cc (internal_getlogin): Ditto. * spawn.cc (spawn_guts) Revert previous patch.
2001-04-30 * grp.cc: Eliminate MAX_DOMAIN_NAME define.Corinna Vinschen
(read_etc_group): Substitute MAX_DOMAIN_NAME by INTERNET_MAX_HOST_NAME_LENGTH. * passwd.cc (parse_pwd): Don't force pw_name to be lower case. * sec_helper.cc: Substitute MAX_USER_NAME by UNLEN, MAX_COMPUTERNAME_LENGTH by INTERNET_MAX_HOST_NAME_LENGTH throughout. (lookup_name): Slight cleanup. * security.cc (alloc_sd): Substitute MAX_USER_NAME by UNLEN. * security.h: Define DEFAULT_UID as DOMAIN_USER_RID_ADMIN and DEFAULT_GID as DOMAIN_ALIAS_RID_ADMINS. * shared.cc (memory_init): Substitute MAX_USER_NAME by UNLEN. * thread.h: Ditto. * uinfo.cc (internal_getlogin): Substitute MAX_USER_NAME by UNLEN. Substitute MAX_COMPUTERNAME_LENGTH and MAX_HOST_NAME by INTERNET_MAX_HOST_NAME_LENGTH. * winsup.h: Include lmcons.h. Eliminate MAX_USER_NAME and MAX_HOST_NAME. Move DEFAULT_UID and DEFAULT_GID to security.h.
2001-04-25 * autoload.cc: Add LoadDLLfunc statements for SetTokenInformation@16.Corinna Vinschen
* cygheap.cc: Include security.h. * grp.cc (internal_getgrent): New function. (getgroups): Rearranged using `internal_getgrent' and the new `cygsid' class. * passwd.cc (internal_getpwent): New function. * sec_acl.cc: Use new `cygsid' class throughout. (acl_access): Use `internal_getgrent' instead of `getgrent'. * sec_helper.cc: Use new `cygsid' class throughout. (get_id_from_sid): Use `internal_getgrent' instead of `getgrent'. Use `internal_getpwent' instead of `getpwent'. * security.cc: Use new `cygsid' class throughout. * security.h: Move `MAX_SID_LEN' from winsup.h to here. Add extern declarations for `internal_getgrent' and `internal_getpwent'. (class cygsid): New class. * shared.cc (sec_user): Use new `cygsid' class. * syscalls.cc (seteuid): Try to set owner to user and primary group to current group in impersonation token before performing impersonation. (setegid): Try to set primary group in process token to the new group if ntsec is on. * uinfo.cc (internal_getlogin): Use new `cygsid' class. Try to set owner to user and primary group to current group in process token if the process has been started from a non cygwin process. (uinfo_init): Set primary group only if the process has been started from a non cygwin process. * winsup.h: Move define for `MAX_SID_LEN' to security.h.
2001-04-20 * grp.cc (getgroups): Change so that SIDs get compared insteadCorinna Vinschen
of strings to SIDs.
2001-04-20 * Makefile.in: Add object files `sec_helper.cc' and `sec_acl.cc'.Corinna Vinschen
* security.cc: Swap out several functions. * sec_acl.cc: New file. Move Sun compatibel ACL functions from `security.cc' to here. * sec_helper.cc: New file. Move security helper functions from `security.cc' to here. * security.h: Changed to accomodate the above changes. * grp.cc: Replace `group_in_memory_p' by `group_state'. Eliminate group_sem throughout. (enum grp_state): New enumeration type. (read_etc_group): Make race safe. * security.cc: Eliminate group_sem throughout.
2001-04-19Throughout, change fdtab references to cygheap->fdtab.Christopher Faylor
* child_info.h (cygheap_exec_info): Eliminate special fdtab stuff. * spawn.cc (spawn_guts): Ditto. * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate. * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap. (_cmalloc_entry): Include fdtab here. * dtable.h (dtable): Declare/define new methods. * dtable.cc (dtable::vfork_child_fixup): New method. (dtable::fixup_after_exec): Remove unneeded extra arguments. * dcrt0.cc (dll_crt0_1): Ditto. * environ.cc (getwinenv): Use case sensitive comparison. (winenv): Make a copy of environment cache to avoid realloc problems when duplicate environment variables exist in the environment. (From Egor Duda) * net.cc (cygwin_socket): Revert Apr 14 change. * include/sys/file.h: Protect against previous X_OK definition. * passwd.cc: Eliminate passwd_sem throughout. * security.cc: Ditto. * cygwin.din: Export New functions. * passwd.cc (read_etc_passwd): Make race safe. (getpwuid_r): New function. (getpwnam_r): New function.
2001-04-18 * grp.cc (getgroups): Avoid crash if passwd field if /etc/group isCorinna Vinschen
empty.
2001-04-16 * grp.cc (getgroups): If `allow_ntsec' is set, use the process tokenCorinna Vinschen
information to evaluate the groups list.
2001-01-28Throughout, change 'cygwin_shared.mount' to 'mount_table'.Christopher Faylor
* child_info.h (child_info): Move shared_h, console_h to cygheap. Add mount_h. * cygheap.h (init_cygheap): Add shared_h, console_h. * cygheap.cc (init_cheap): Initialize heap at a fixed location after the shared memory regions. Initialize cygheap->user name here. * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants. Remove cygheap_init since it is done in shared_init now. (_dll_crt0): Initialize mount_h, remove shared_h and console_h initialization. * fhandler_console.cc (console_shared_h): Eliminate. (get_tty_stuff): Use cygheap->console_h rather than console_shared_h. * heap.cc (heap_init): Use page size constant calculated earlier in initialization. * shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h. (mount_table_init): New function for initializing a user mount table. (open_shared_file_map): Use constant for shared memory region. Initialize cygheap and mount table here. (open_shared): Improve debugging output. (shared_info::initialize): Eliminate call to mount.init. (shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h. (open_shared_file_map): Eliminate. * shared_info.h (mount_info): Add a version field. (shared_align_past): New macro for calculating location for shared memory regions. * sigproc.cc (init_child_info): Eliminate shared_h, console_h. * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different user. * syscalls.cc (system_info): New global holding system memory defaults. (getpagesize): Use system_info. * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent. * winsup.h: Declare system_info. * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than retrieving the name again.
2000-11-15 * cygheap.cc (cygheap_root::cygheap_root): New function.Corinna Vinschen
(cygheap_root::~cygheap_root): Ditto. (cygheap_root::operator=): Ditto. (cygheap_user::~cygheap_user): Ditto. (cygheap_user::set_name): Ditto. (cygheap_user::set_logsrv): Ditto. (cygheap_user::set_domain): Ditto. (cygheap_user::set_sid): Ditto. * cygheap.h (cygheap_root): New class. (cygheap_user): Ditto. (init_cygheap): Change type of `root' member to cygheap_root. Add `user' member. * dir.cc (opendir): Use new `cygheap_root' class. * dcrt0.cc (dll_crt0_1): Use new `cygheap_user' class. * fork.cc (fork_parent): Ditto. * grp.cc (getgroups): Ditto. * passwd.cc (search_for): Ditto. * path.cc: Use new `cygheap_root' class throughout. * pinfo.h (_pinfo): Remove `use_psid'. Move `username', `psid', `logsrv', `domain', `orig_{uid,gid}' and `real_{uid,gid}' to cygheap_user class. * security.cc: Use new `cygheap_user' class throughout. * shared.cc (sec_user): Ditto. * sigproc.cc (proc_subproc): Remove copy statements for user related information moved to `cygheap_user' class. * spawn.cc (spawn_guts): Invalidate current chroot settings when creating Windows environment. Use new `cygheap_user' class. * syscalls.cc: Use new `cygheap_user' class throughout. * uinfo.cc: Ditto. * uinfo.cc (internal_getlogin): Change parameters to reflect the move of user information to cygheap.
2000-10-17* Makefile.in: Remove some obsolete stuff.Christopher Faylor
* dcrt0.cc (dll_crt0_1): Call signal_fixup_after_exec where appropriate. Set myself->uid from parent version. Just use ThreadItem Init method. Close or store hexec_proc as appropriate. (_dll_crt0): Store user_data->forkee here so that proper tests can be made subsequently. (do_exit): Remove hExeced stuff. * environ.cc (environ_init): Accept environ count as well as environ pointer. * environ.h: Reflect above change. * pinfo.cc (pinfo_init): Ditto. Accept environ count. (fixup_in_spawned_child): Remove. * spawn.cc (spawn_guts): Move signal code to dll_crt0_1. Don't suspend execing process since it is no longer necessary. Store envc. * exceptions.cc (signal_fixup_after_exec): New function. (call_handler): Remove hExeced test. * child_info.h (cygheap_exec_info): Store envc as well as envp. (child_info_spawn): Store hexec_proc so that it can be closed in child. * path.cc (normalize_posix_path): Avoid intermediate use of temporary cwd buf. (normalize_win32_path): Ditto. (cwdstuff::get_initial): Always set lock. * sigproc.h: Remove hExeced. * strace.cc (strace::vsprntf): Modify to accomodate for lack of hExeced. * thread.cc (MTinterface::Init): Merge Init1 and ClearReent into this method. (MTinterface::Init1): Eliminate. (MTinterface::ClearReent): Eliminate. * thread.h: Reflect above changes. * include/sys/strace.h (strace): Make microseconds() public. Make various functions 'regparm', throughout. * pinfo.h (_pinfo): Inline simple signal manipulation functions. Requires inclusion of thread.h which was removed from .cc files, where appropriate. throughout. * pinfo.cc: Eliminate signal manipulation functions. (_pinfo::exit): Calculate total rusage for exiting process here. * cygheap.cc (size2bucket): Eliminate. (init_buckets): Ditto. (_cmalloc): Calculate size and bits in a loop rather than going through a function call. (_crealloc): Use stored array index to calculate allocated size. * spawn.cc (spawn_guts): Use _pinfo exit method to exit, calculating cpu usage.
2000-09-04* path.cc (readlink): Check if buffer length is positive. Truncate output toChristopher Faylor
buffer length. Don't terminate buffer with '\0'.
2000-08-29* grp.cc (getgroups): fail with EINVAL if array is not largeDJ Delorie
enough to hold all supplementary group IDs.
2000-08-22* winsup.h: Eliminate inclusion of most of the cygwin .h files. Use .h filesChristopher Faylor
only in sources which require them. * Makefile.in: Generate dependencies with -MD option.
2000-08-12* winsup.h: Split out dtable definitions into separate header file.Christopher Faylor
* dtable.h: New file. * sigproc.h: Eliminate pinfo.h usage here. Use it in source files that need it.
2000-08-02* winsup.h: take out protections of environ, errno, allow C useDJ Delorie
* *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__); use cur_environ() instead of just environ * times.cc: remove import protections * glob.c: add winsup.h * localtime.c: ditto * smallprint.c: ditto * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
2000-07-01Changes by Kazuhiro Fujieda <fujieda@jaist.ac.jp>Corinna Vinschen
* assert.cc (__assert): Reduce dependency on newlib. * exec.cc: Eliminate unnecessary inclusion of ctype.h. * glob.c: Ditto. * hinfo.cc: Ditto. * init.cc: Ditto. * strace.cc: Ditto. * tty.cc: Ditto. * grp.cc (parse_grp): Eliminate atoi. * passwd.cc (grab_int): Ditto. * grp.cc (getgroups): Eliminate str{n,}casecmp. * path.cc (get_raw_device_number): Ditto. * path.cc (sort_by_native_name): Ditto. * spawn.cc (iscmd): Ditto. * uinfo.cc (internal_getlogin): Ditto.
2000-06-25* grp.cc (read_etc_group): Open file in text mode.Christopher Faylor
* pwd.cc (read_etc_passwd): Ditto. * shared.h: Bump PROC_MAGIC.
2000-04-03 * grp.cc (parse_grp): Save empty array instead ofCorinna Vinschen
NULL in gr_mem if no supplementary group is given.
2000-02-21Respond to a multitude of g++ warnings.Christopher Faylor
2000-02-17import winsup-2000-02-17 snapshotChristopher Faylor