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:
authorJoshua Daniel Franklin <joshuadfranklin@yahoo.com>2004-01-24 11:09:45 +0300
committerJoshua Daniel Franklin <joshuadfranklin@yahoo.com>2004-01-24 11:09:45 +0300
commitaff8b4f9aa3fa704805d389f983c172121e52f63 (patch)
tree60136785e549dadf71f1523240fc970b25c2f60e /winsup/doc/ntsec.sgml
parentf4e815bc30f3c7179b8a914bb043ce087d7ad988 (diff)
2004-01-24 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
* cygwinenv.sgml: Cleanup minor markup problems. * dll.sgml: Cleanup minor markup problems. * effectively.sgml: Cleanup minor markup problems. * gcc.sgml: Cleanup minor markup problems. * ntsec.sgml: Cleanup minor markup problems. * pathnames.sgml: Cleanup minor markup problems. * setup-net.sgml: Cleanup minor markup problems. * textbinary.sgml: Cleanup minor markup problems. * windres.sgml: Cleanup minor markup problems.
Diffstat (limited to 'winsup/doc/ntsec.sgml')
-rw-r--r--winsup/doc/ntsec.sgml13
1 files changed, 7 insertions, 6 deletions
diff --git a/winsup/doc/ntsec.sgml b/winsup/doc/ntsec.sgml
index 0a5fe42a8..9cbd0bb06 100644
--- a/winsup/doc/ntsec.sgml
+++ b/winsup/doc/ntsec.sgml
@@ -605,11 +605,11 @@ anymore. Porting a <command>setuid</command> application is illustrated by
a short example:</para>
<screen>
-
+<![CDATA[
/* First include all needed cygwin stuff. */
#ifdef __CYGWIN__
-#include &lt;windows.h&gt;
-#include &lt;sys/cygwin.h&gt;
+#include <windows.h>
+#include <sys/cygwin.h>
/* Use the following define to determine the Windows version */
#define is_winnt (GetVersion() < 0x80000000)
#endif
@@ -641,16 +641,17 @@ a short example:</para>
/* Use standard method for W9X as well. */
hashed_password = crypt (cleartext_password, salt);
if (!user_pwd_entry ||
- strcmp (hashed_password, user_pwd_entry-&gt;pw_password))
+ strcmp (hashed_password, user_pwd_entry->pw_password))
error_exit;
[...]
/* Everything else remains the same! */
- setegid (user_pwd_entry-&gt;pw_gid);
- seteuid (user_pwd_entry-&gt;pw_uid);
+ setegid (user_pwd_entry->pw_gid);
+ seteuid (user_pwd_entry->pw_uid);
execl ("/bin/sh", ...);
+]]>
</screen>