Commit Graph

36 Commits

Author SHA1 Message Date
Corinna Vinschen 93b05a87c2 Cygwin: doc: fix description of new "env" schema for /etc/nsswitch.conf
Fixes: 27376c60a9 ("Allow deriving the current user's home directory via the HOME variable")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-03-29 10:34:30 +02:00
Johannes Schindelin 27376c60a9 Allow deriving the current user's home directory via the HOME variable
This patch hails from Git for Windows (where the Cygwin runtime is used
in the form of a slightly modified MSYS2 runtime), where it is a
well-established technique to let the `$HOME` variable define where the
current user's home directory is, falling back to `$HOMEDRIVE$HOMEPATH`
and `$USERPROFILE`.

The idea is that we want to share user-specific settings between
programs, whether they be Cygwin, MSYS2 or not.  Unfortunately, we
cannot blindly activate the "db_home: windows" setting because in some
setups, the user's home directory is set to a hidden directory via an
UNC path (\\share\some\hidden\folder$) -- something many programs
cannot handle correctly, e.g. `cmd.exe` and other native Windows
applications that users want to employ as Git helpers.

The established technique is to allow setting the user's home directory
via the environment variables mentioned above: `$HOMEDRIVE$HOMEPATH` or
`$USERPROFILE`.  This has the additional advantage that it is much
faster than querying the Windows user database.

Of course this scheme needs to be opt-in.  For that reason, it needs
to be activated explicitly via `db_home: env` in `/etc/nsswitch.conf`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2023-03-28 12:18:14 +02:00
Corinna Vinschen 3b37a11870 Cygwin: uinfo: Drop long disabled nss_prefix and nss_separator
Originally the code was written to allow three ways of prefixing
accounts and to freely define a domain/account separator.  This code
has been disabled even before being officially released, and it was
never re-enabled. Given there has been no complaints for eight years
now, drop this code eventually.  Just add a macro to define the
domain/account separator statically.

Fixes: cc332c9e27 ("(cygheap_pwdgrp::nss_init_line): Disable db_prefix
and db_separator settings.  Add comment")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-12-02 16:35:31 +01:00
David Macek via Cygwin-patches 6867660301 cygwin: doc: Add keywords for ACE order issues
Windows Explorer shows a warning with Cygwin-created DACLs, but putting
the text of the warning into Google doesn't lead to the relevant Cygwin
docs.  Let's copy the warning text into the docs in the hopes of helping
confused users.  Most of the credit for the wording belongs to Yaakov
Selkowitz.

Latest inquiry: <https://cygwin.com/pipermail/cygwin/2020-May/244814.html>

Signed-off-by: David Macek <david.macek.0@gmail.com>
2020-05-19 11:42:02 +02:00
David Macek via Cygwin-patches 969c8392fe Cygwin: accounts: Don't keep old schemes when parsing nsswitch.conf
The implicit assumption seemed to be that any subsequent occurence of
the same setting in nsswitch.conf is supposed to rewrite the previous
ones completely.  This was not the case if the third or any further
schema was previously defined and the last line defined less than that
(but at least 2), for example:

```
db_home: windows cygwin /myhome/%U
db_home: cygwin desc
```

Let's document this behavior as well.

Signed-off-by: David Macek <david.macek.0@gmail.com>
2020-04-22 09:32:33 +02:00
David Macek via Cygwin-patches d5add9ee5e Cygwin: accounts: Unify nsswitch.conf db_* defaults
Signed-off-by: David Macek <david.macek.0@gmail.com>
2020-04-22 09:32:33 +02:00
Corinna Vinschen e53373bbdb Cygwin: re-enable create_token for older systems
Under WOW64 on 64 bit Windows 7, MsV1_0S4ULogon appears to be
unimplemented, probably under Vista as well.  Re-enable
create_token method, to allow basic seteuid on W7 WOW64 and
Vista as well.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-18 21:00:59 +01:00
Corinna Vinschen 0fb497165f Cygwin: seteuid: use Kerberos/MsV1_0 S4U authentication by default
- This simple and official method replaces cyglsa and "create token"
  methods.  No network share access, same as before.

- lsaauth and create_token are disabled now.  If problems crop up,
  they can be easily reactivated.  If no problems crop up, they
  can be removed in a while, together with the lsaauth subdir.

- Bump Cygwin version to 3.0.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-26 19:41:03 +01:00
David Macek a3b5795b06 doc/ntsec.xml: Fix typo 2018-02-21 22:41:53 +01:00
Corinna Vinschen 54c284caf2 Remove XP and Server 2003 from documentation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-24 23:21:10 +02:00
Jon TURNEY 5ea698c437 winsup/doc: Create info pages from cygwin documentation
v2:
Updated to use docbook2x-texi not docbook2texi, since source is now docbook XML.
Tweak DocBook XML so info directory entry has a description.

v3:
Use a custom charmap to handle &reg;

v4:
Proper build avoidance
texinfo node references may not contain ':', so provide alternate text for a few
xref targets

2015-06-22  Jon Turney  <jon.turney@dronecode.org.uk>

	* Makefile.in (install-info, cygwin-ug-net.info)
	(cygwin-api.info): Add.
	* cygwin-ug-net.xml: Add texinfo-node.
	* cygwin-api.xml: Ditto.
	* ntsec.xml (db_home): Add texinfo-node for titles containing a
	':' which are the targets of an xref.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2015-06-23 12:05:29 +01:00
Yaakov Selkowitz 37ab32da30 Fix more typos in ntsec.xml
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2015-04-29 12:55:03 -05:00
Corinna Vinschen a34ebbad28
Fix more typos in ntsec.xml
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-03-12 11:14:57 +01:00
Corinna Vinschen 1aa532fec2
Fix typos in ntsec.xml
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-03-12 10:53:33 +01:00
Corinna Vinschen 28edc819f2 * ntsec.xml (ntsec-mapping): Match the description of the default
values for db_home, db_shell, and db_gecos to the latest changes.
2015-02-25 12:48:34 +00:00
Corinna Vinschen 54ade28dfa * ntsec.xml: Throughout fix references to the Cygwin version number. 2015-02-12 08:48:34 +00:00
Corinna Vinschen 3fce2d8a2b * ntsec.xml (ntsec-mapping-nsswitch-passwd): Document /path %H wildcard.
(ntsec-mapping-nsswitch-home): Disable text explaining how the home
	directory is fetched from the homeDrive attribute.
2015-01-14 11:23:29 +00:00
Yaakov Selkowitz f94bbabd89 * ntsec.xml (ntsec-logonuser): Fix spelling of pw_passwd field. 2014-12-18 17:30:56 +00:00
Corinna Vinschen 6c5c9bf5ee * ntsec.xml (ntsec-mapping-samba): Clarify Samba file server setup. 2014-12-10 12:35:36 +00:00
Corinna Vinschen b9e2c265d0 * cygwin.xsl (toc.section.depth): Set to 4.
* ntsec.xml: Revamp account mapping documentation to account for the
	new db_home, db_shell, db_gecos settings.
2014-12-06 16:49:05 +00:00
Corinna Vinschen 9de862718c Fix typo 2014-11-10 20:27:22 +00:00
Corinna Vinschen 3a464532d9 * ntsec.xml: Fix typo. 2014-10-30 17:22:09 +00:00
Corinna Vinschen 1a6fa5618a * ntsec.xml (ntsec-mapping-caching): Describe service dependencies
in terms of cygserver.
2014-10-29 10:09:41 +00:00
Corinna Vinschen 09687ee963 * ntsec.xml: Fix Solaris doc URLs. 2014-10-28 09:45:45 +00:00
Corinna Vinschen 3c8e918c38 * ntsec.xml: Try to make an expression less ambiguous. 2014-10-28 09:03:50 +00:00
Corinna Vinschen 3d411b0591 * ntsec.xml: More language fixes. 2014-10-27 12:35:41 +00:00
Corinna Vinschen 1fc5d69923 Fix typo 2014-10-26 10:29:25 +00:00
Corinna Vinschen 36e14a881e fix typo 2014-10-24 16:44:38 +00:00
Corinna Vinschen 63a2c2c204 * ntsec.xml: More language and typo fixes. 2014-10-24 10:35:31 +00:00
Corinna Vinschen 299d75822f * ntsec.xml: Fix language. 2014-10-23 15:31:58 +00:00
Corinna Vinschen b4536f29c5 * ntsec.xml (ntsec-common): Drop outdated comment about underdeveloped
Solaris ACL API support.
2014-08-31 20:06:14 +00:00
Corinna Vinschen 489d1e5db9 * ntsec.xml: Disable description of db_prefix and db_separator settings. 2014-08-31 18:19:03 +00:00
Corinna Vinschen 89d35a4833 * ntsec.xml (ntsec-mapping): Drop plus-prepended builtin accounts as
default setting.  Add short explanation in db_prefix: always mode.
	Fix a type.  Drop a paragraph with redundant information.
2014-08-06 14:46:03 +00:00
Corinna Vinschen dea309cf1f * ntsec.xml: Small improvments. 2014-07-30 12:00:24 +00:00
Corinna Vinschen f092b3ddf3 * cygwin.xsl: Allow 3 section levels in TOC.
* new-features.xml: (ov-new1.7.32): Add new section.
	* ntsec.xml: Rename top-level section to reflect extension of topics.
	Remove old /etc/passwd, /etc/group considerations.  Add new sections
	explaining Windows to POSIX account mapping.  Make setuid sections
	third level sections.
	* pathnames.xml: Note new method of account mapping for fstab.d/$USER.
	* faq-setup.xml: Rework references to /etc/passwd and /etc/group to
	reflect changes to account handling.
	* faq-using.xml: Ditto.
2014-07-30 11:07:34 +00:00
Warren Young 8142972d87 Modernized user guide, API reference, and FAQ generation. Overall
effect is to move away from DocBook SGML and DJ Delorie's doctool and
toward pure DocBook XSL.  (There remains just one use of doctool, and
we have plans for replacing it, too.)  See ChangeLog for details.
2013-05-01 23:30:25 +00:00