* autoload.cc (NtSetSecurityObject): Add.

* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Only request
	READ_CONTROL rights when opening the file.
	* ntdll.h (NtSetSecurityObject): Add declaration.
	* security.cc (write_sd): Call NtSetSecurityObject instead of
	BackupWrite.
	(get_nt_object_security): Don't free security descriptor here.

	* syscalls.cc (ttyname): Use buffer of length TTY_NAME_MAX + 1.
	* sysconf.cc (sysconf): Handle _SC_TTY_NAME_MAX request.
	* include/limits.h: Define TTY_NAME_MAX and _POSIX_TTY_NAME_MAX.
This commit is contained in:
Corinna Vinschen
2004-04-14 10:20:26 +00:00
parent 93d66ddc20
commit f4ae6dc62c
8 changed files with 51 additions and 56 deletions

View File

@@ -1536,8 +1536,8 @@ ttyname_r (int fd, char *buf, size_t buflen)
extern "C" char *
ttyname (int fd)
{
static char name[CYG_MAX_PATH];
int ret = ttyname_r (fd, name, CYG_MAX_PATH);
static char name[TTY_NAME_MAX + 1];
int ret = ttyname_r (fd, name, TTY_NAME_MAX + 1);
if (ret)
{
set_errno (ret);