This is the mail archive of the
mailing list for the Cygwin project.
Re: sshd and fstat
- From: swamp-dog at ntlworld dot com (Guy Harrison)
- To: <cygwin at cygwin dot com>
- Date: Fri, 18 Jan 2002 12:25:33 GMT
- Subject: Re: sshd and fstat
- References: <email@example.com>
- Reply-to: <cygwin at cygwin dot com>
On Thu, 17 Jan 2002 14:49:28 GMT, firstname.lastname@example.org (Guy Harrison)
I'm pleased to be able to report some progress! I've located where the
key difference lies between sshd running as an NT service and sshd
running in just about any other fashion.
1237 get_file_attribute (int use_ntsec, const char *file,
1238 int *attribute, uid_t *uidret, gid_t
1240 int res;
- 1242 if (use_ntsec && allow_ntsec)
- 1244 res = get_nt_attribute (file, attribute, uidret,
- 1245 if (attribute && (*attribute & S_IFLNK) ==
- 1246 *attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
- 1247 return res;
1250 if (uidret)
1251 *uidret = getuid ();
1252 if (gidret)
1253 *gidret = getgid ();
In almost all circumstances 'allow_ntsec' is true. No problem - sshd
correctly obtains the permissions on the client's $HOME/.ssh/*keys.
The single circumstance in which 'allow_ntsec' is false, is when sshd is
running *directly* as a service: in other words, as it is designed to.
Could someone enlighten me about 'allow_ntsec'. How does CygWin turn
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html