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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-12-14 20:23:42 +0300
committerCorinna Vinschen <corinna@vinschen.de>2002-12-14 20:23:42 +0300
commit85ecb9be00c71d3bc2bc66c2c166d7a8245a8c1d (patch)
treee451a0325fdf4966e1733295a67698bb975688fe
parentb60e545bb64f96a4eaad691e623891baed6ffbcf (diff)
2002-12-14 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (dll_crt0_1): Call well known SID initializer function. * security.h (cygsid::init): Declare new static method. * sec_helper.cc (cygsid::init): New method for initializing well known SIDs. 2002-12-14 Pierre Humblet <pierre.humblet@ieee.org> * security.h: Declare well_known_creator_group_sid. * sec_helper.cc: Define and initialize well_known_creator_group_sid.
-rw-r--r--winsup/cygwin/ChangeLog12
-rw-r--r--winsup/cygwin/dcrt0.cc3
-rw-r--r--winsup/cygwin/sec_helper.cc43
-rw-r--r--winsup/cygwin/security.h2
4 files changed, 48 insertions, 12 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 72a089dfc..484ca0f11 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,17 @@
2002-12-14 Corinna Vinschen <corinna@vinschen.de>
+ * dcrt0.cc (dll_crt0_1): Call well known SID initializer function.
+ * security.h (cygsid::init): Declare new static method.
+ * sec_helper.cc (cygsid::init): New method for initializing well
+ known SIDs.
+
+2002-12-14 Pierre Humblet <pierre.humblet@ieee.org>
+
+ * security.h: Declare well_known_creator_group_sid.
+ * sec_helper.cc: Define and initialize well_known_creator_group_sid.
+
+2002-12-14 Corinna Vinschen <corinna@vinschen.de>
+
* netdb.cc: Remove strtok_r comment.
2002-12-14 Pierre Humblet <pierre.humblet@ieee.org>
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index d42fbfab9..f12654d26 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -681,6 +681,9 @@ dll_crt0_1 ()
/* Allocate cygheap->fdtab */
dtable_init ();
+ /* Init global well known SID objects */
+ cygsid::init ();
+
/* Initialize uid, gid if necessary. */
if (child_proc_info == NULL || spawn_info->moreinfo->uid == ILLEGAL_UID)
uinfo_init ();
diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc
index 0a5c5803d..f300398c7 100644
--- a/winsup/cygwin/sec_helper.cc
+++ b/winsup/cygwin/sec_helper.cc
@@ -48,18 +48,37 @@ SID_IDENTIFIER_AUTHORITY sid_auth[] = {
{SECURITY_NT_AUTHORITY}
};
-cygsid well_known_null_sid ("S-1-0-0");
-cygsid well_known_world_sid ("S-1-1-0");
-cygsid well_known_local_sid ("S-1-2-0");
-cygsid well_known_creator_owner_sid ("S-1-3-0");
-cygsid well_known_dialup_sid ("S-1-5-1");
-cygsid well_known_network_sid ("S-1-5-2");
-cygsid well_known_batch_sid ("S-1-5-3");
-cygsid well_known_interactive_sid ("S-1-5-4");
-cygsid well_known_service_sid ("S-1-5-6");
-cygsid well_known_authenticated_users_sid ("S-1-5-11");
-cygsid well_known_system_sid ("S-1-5-18");
-cygsid well_known_admins_sid ("S-1-5-32-544");
+cygsid well_known_null_sid;
+cygsid well_known_world_sid;
+cygsid well_known_local_sid;
+cygsid well_known_creator_owner_sid;
+cygsid well_known_creator_group_sid;
+cygsid well_known_dialup_sid;
+cygsid well_known_network_sid;
+cygsid well_known_batch_sid;
+cygsid well_known_interactive_sid;
+cygsid well_known_service_sid;
+cygsid well_known_authenticated_users_sid;
+cygsid well_known_system_sid;
+cygsid well_known_admins_sid;
+
+void
+cygsid::init ()
+{
+ well_known_null_sid = "S-1-0-0";
+ well_known_world_sid = "S-1-1-0";
+ well_known_local_sid = "S-1-2-0";
+ well_known_creator_owner_sid = "S-1-3-0";
+ well_known_creator_group_sid = "S-1-3-1";
+ well_known_dialup_sid = "S-1-5-1";
+ well_known_network_sid = "S-1-5-2";
+ well_known_batch_sid = "S-1-5-3";
+ well_known_interactive_sid = "S-1-5-4";
+ well_known_service_sid = "S-1-5-6";
+ well_known_authenticated_users_sid = "S-1-5-11";
+ well_known_system_sid = "S-1-5-18";
+ well_known_admins_sid = "S-1-5-32-544";
+}
char *
cygsid::string (char *nsidstr) const
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h
index 7c95ce8aa..7ed0307ce 100644
--- a/winsup/cygwin/security.h
+++ b/winsup/cygwin/security.h
@@ -40,6 +40,7 @@ class cygsid {
}
public:
+ static void init();
inline operator const PSID () { return psid; }
inline const PSID operator= (cygsid &nsid)
@@ -184,6 +185,7 @@ extern cygsid well_known_null_sid;
extern cygsid well_known_world_sid;
extern cygsid well_known_local_sid;
extern cygsid well_known_creator_owner_sid;
+extern cygsid well_known_creator_group_sid;
extern cygsid well_known_dialup_sid;
extern cygsid well_known_network_sid;
extern cygsid well_known_batch_sid;