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>
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>
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>
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>
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>
- 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>
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 ®
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>
* 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.
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.