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>2008-03-13 18:18:10 +0300
committerCorinna Vinschen <corinna@vinschen.de>2008-03-13 18:18:10 +0300
commit7d5d232b50f9f0910d10cb6635d5132f774674f5 (patch)
treedc7d5243e0770c116e1a03ef0caf572f3665caf7 /winsup/cygwin/security.sgml
parent455b4f90fb92a68d0a4dd90a15c64ff732240635 (diff)
* path.sgml: Remove documentation for old path API. Add documentation
for new path API. * security.sgml: New file to document cygwin_set_impersonation_token and cygwin_logon_user with only eight years of delay. * shared.sgml: Remove file. * include/sys/cygwin.h (cygwin32_attach_handle_to_fd): Move declaration into fully deprecated function block. (cygwin_logon_user): Move declaration down to declaration of cygwin_set_impersonation_token.
Diffstat (limited to 'winsup/cygwin/security.sgml')
-rw-r--r--winsup/cygwin/security.sgml45
1 files changed, 45 insertions, 0 deletions
diff --git a/winsup/cygwin/security.sgml b/winsup/cygwin/security.sgml
new file mode 100644
index 000000000..b286ef540
--- /dev/null
+++ b/winsup/cygwin/security.sgml
@@ -0,0 +1,45 @@
+<sect1 id="func-cygwin-logon_user">
+<title>cygwin_logon_user</title>
+
+<funcsynopsis><funcprototype>
+<funcdef>extern "C" HANDLE
+<function>cygwin_logon_user</function></funcdef>
+<paramdef>const struct passwd *<parameter>passwd_entry</parameter></paramdef>
+<paramdef>const char *<parameter>password</parameter></paramdef>
+</funcprototype></funcsynopsis>
+
+<para>Given a pointer ot a passwd entry of a user and a cleartext password,
+returns a HANDLE to an impersonation token for this user which can be used
+in a subsequent call to <function>cygwin_set_impersonation_token</function>
+to impersonate that user. This function can only be called from a process
+which has the required NT user rights to perform a logon.</para>
+
+<para>See also the chapter "New setuid concept" in the Cygwin user's guide.
+</para>
+
+<para>See also <link linkend="func-cygwin-set-impersonation-token">cygwin_set_impersonation_token</link></para>
+
+</sect1>
+
+<sect1 id="func-cygwin-set-impersonation-token">
+<title>cygwin_set_impersonation_token</title>
+
+<funcsynopsis><funcprototype>
+<funcdef>extern "C" void
+<function>cygwin_set_impersonation_token</function></funcdef>
+<paramdef>const HANDLE <parameter>token</parameter></paramdef>
+</funcprototype></funcsynopsis>
+
+<para>Use this function to enable the token given as parameter as
+impersonation token for the next call to <function>setuid</function> or
+<function>seteuid</function>. Use
+<function>cygwin_set_impersonation_token</function> together with
+<function>cygwin_logon_user</function> to impersonate users using
+password authentication.</para>
+
+<para>See also the chapter "New setuid concept" in the Cygwin user's guide.
+</para>
+
+<para>See also <link linkend="func-cygwin-logon_user">cygwin_logon_user</link></para>
+
+</sect1>