Re: Allow to send SIGQUIT via Ctrl+BREAK (patch included)

2005-11-24 Thread Christian Franke
Christopher Faylor wrote: [...] Suggest to add some option to send SIGQUIT via ^BREAK. A simple patch is attached. It sends SIGQUIT on ^BREAK if both VINTR and VQUIT are set to ^C. As a positive side effect, this disables any other SIGQUIT key in termios. Sorry but the precedent of sending

Re: Allow to send SIGQUIT via Ctrl+BREAK (patch included)

2005-11-25 Thread Christian Franke
Christopher Faylor wrote: [...] It is (or should be, since I haven't checked it recently) supported if you set CYGWIN=tty, though. There is a lot of functionality that isn't available with the normal windows console that is available with CYGWIN=tty. Oh, Yes. I tested this some time ago

Re: Allow to send SIGQUIT via Ctrl+BREAK (patch included)

2005-11-25 Thread Christian Franke
Christopher Faylor wrote: On Fri, Nov 25, 2005 at 08:43:43PM +0100, Christian Franke wrote: OK, let's forget the patch ;-) Actually, I have done some more testing myself and Windows doesn't work the way that I remembered. It seems like CTRL-BREAK isn't handled by signal(SIGINT

Re: [Patch] regtool: Add load/unload commands and --binary option

2006-01-25 Thread Christian Franke
Corinna Vinschen wrote: [...] Thanks for this patch, it looks pretty useful. There are just two things missing. First, could you please create a matching ChangeLog entry? OK. Second, worse, I don't see your name on the list of people having a copyright assignment in place, which is

Re: [Patch] regtool: Add load/unload commands and --binary option

2006-02-13 Thread Christian Franke
Hi Corrinna, you wrote: Hi Christian, On Jan 26 10:19, Corinna Vinschen wrote: On Jan 25 21:58, Christian Franke wrote: Will send the snail mail with the legal stuff soon ;-) Thanks, I'm looking forward. Sorry for the hassle, but we still didn't get legal permit

Re: [Patch] regtool: Add load/unload commands and --binary option

2006-03-01 Thread Christian Franke
set KEY/BINVALUE 01 02 FE FF $ x=$(regtool -b get KEY/BINVALUE) $ regtool -b set KEY/BINVALUE $x The load/unload actions are unchanged. Christian = 2006-03-01 Christian Franke [EMAIL PROTECTED] * regtool.cc: Add actions load/unload and option -b, --binary

Re: [Patch] regtool: Add load/unload commands and --binary option

2006-03-03 Thread Christian Franke
Igor Peshansky wrote: What's wrong with using open() flags? Save/restore registry tree in/from file tree wont work. Suggest to start a new thread for this discussion Right, good idea, except not on this list (as Dave pointed out). What would be a good place --

[Patch] Adding .. may not work in readdir()

2006-05-08 Thread Christian Franke
Both else-if conditions at the end of readdir() are identical, so .. case will never be executed. The attached patch for fhandler_disk_file.cc 1.183 may fix this (untested blind patch, sorry ;-) Christian --- fhandler_disk_file.cc.orig 2006-05-08 16:21:46.984375000 +0200 +++

[Patch] cygpath -O and -F options (was: Two short scripts for Cygwin-Windows interoperation)

2007-01-08 Thread Christian Franke
[Initially sent to cygwin instead of cygwin-patches] 2007-01-07Christian Franke [EMAIL PROTECTED] * cygpath.cc (usage): Add -O and -F, remove tabs. (get_special_folder): New function. (get_user_folder): New function. (dowin): Add -O and -F, better -D, -P error handling. (main

Re: [Patch] Segfault on unaligned lseek() on /dev/sdX (was: [ITP] ddrescue 1.3)

2007-05-18 Thread Christian Franke
Christopher Faylor wrote: On Fri, May 18, 2007 at 09:02:15PM +0200, Christian Franke wrote: ... It seems like this could be done without the heavyweight use of malloc, like use an automatic array of length 512 + 4 and calculate an aligned address from that. Sorry, no. unaligned

Re: [Patch] Segfault on unaligned lseek() on /dev/sdX (was: [ITP] ddrescue 1.3)

2007-05-19 Thread Christian Franke
Pedro Alves wrote: Christopher Faylor escreveu: On Fri, May 18, 2007 at 09:02:15PM +0200, Christian Franke wrote: Hi, Cygwin 1.5.24-2 segfaults on unaligned lseek() on raw block devices with sector size 512 bytes. Testcases: $ dd skip=1000 bs=2047 if=/dev/scd0 of=/dev/null $ ddrescue -c 1

Re: [Patch] Segfault on unaligned lseek() on /dev/sdX (was: [ITP] ddrescue 1.3)

2007-05-19 Thread Christian Franke
Pedro Alves wrote: ... I'm just looking at fhandler_floopy.cc for the first time, but, isn't there the possibility that bytes_left can be a bit too big for alloca? AFAIK not: bytes_left is always less than bytes_per_sector. The _dev_floppy class is only used for Floppy (512), HD (usually

Re: [Patch] Segfault on unaligned lseek() on /dev/sdX (was: [ITP] ddrescue 1.3)

2007-05-20 Thread Christian Franke
fhandler_dev_floppy::lseek() always clears the 60KB pre-read buffer, even on lseek(fd, 0, SEEK_CUR); If a programm (like ddrescue) always calls lseek() before each read(), performance is poor, because the same block is read several times. With this new version of the patch, the buffer is only

Re: [Patch] Segfault on unaligned lseek() on /dev/sdX (was: [ITP] ddrescue 1.3)

2007-05-21 Thread Christian Franke
Corinna Vinschen wrote: As for the devbuf part of the patch, it's missing a ChangeLog entry. Can you please send one, possibly in present tense? (Your first ChangeLog was incorrectly written in past tense) 2007-05-21 Christian Franke [EMAIL PROTECTED] * fhandler_floppy.cc

[Patch] strace ./app.exe probably runs application from /bin

2007-06-02 Thread Christian Franke
fix this. 2007-06-02 Christian Franke [EMAIL PROTECTED] * strace.cc (create_child): Don't remove current directory from application path. Christian --- cygwin-1.5.24-2.orig/winsup/utils/strace.cc 2006-05-24 18:50:50.00100 +0200 +++ cygwin-1.5.24-2/winsup/utils/strace.cc

Re: [Patch] strace ./app.exe probably runs application from /bin

2007-06-02 Thread Christian Franke
Christopher Faylor wrote: ... Thanks for the problem report and test case but this is pretty clearly not the right way to deal with the issue. Putting a special case catch of ./ around a function call which is intended to deal with paths is pretty clearly a band-aid. Yes. Let me

Re: [Patch] strace ./app.exe probably runs application from /bin

2007-06-03 Thread Christian Franke
() use absolute path names. So it should not break anything to keep a leading ./. 2007-06-03 Christian Franke [EMAIL PROTECTED] * path.cc (cygpath): Don't remove leading ./ to avoid invalid application search in strace and cygcheck. Christian --- cygwin-1.5.24-2.orig/winsup/utils

Re: [Patch] strace ./app.exe probably runs application from /bin

2007-06-03 Thread Christian Franke
Brian Dessent wrote: Christopher Faylor wrote: Let me rephrase the problem: cygpath does not properly deal with the current directory Thanks for the patch but we won't be applying it in this form. I've been meaning to take a look at fixing this myself, because I'm tired of: $ cd

[Patch] Encode invalid chars in /proc/registry entries

2007-11-15 Thread Christian Franke
Registry key and value names may contain chars which are not allowed within file names ('/', '\', :). But Cygwin's /proc/registry returns these names unchanged to the app. The obvious effect is that such entries cannot be accessed. But if an entry name is identical to an existing path, more

Re: [Patch] Encode invalid chars in /proc/registry entries

2007-11-16 Thread Christian Franke
names? I'd be glad for any help. I will have a look at it, but be patient. Is current HEAD a reasonable starting point or is there a better (more stable) snapshot? Christian 2007-11-16 Christian Franke [EMAIL PROTECTED] * fhandler_registry.cc (must_encode): New function

Re: [Patch] Encode invalid chars in /proc/registry entries

2007-11-16 Thread Christian Franke
Christopher Faylor wrote: .. Patch is tested with 1.5.24-2. Merge with HEAD looks good, but was not actually tested. Therefore, no changelog provided yet. Thanks for this patch. Apart from the missing ChangeLog I'm inclined to apply it to the upcoming 1.5.25 release, but I don't like

Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-28 Thread Christian Franke
Corinna Vinschen wrote: On Nov 27 21:15, Christopher Faylor wrote: ... If Corinna's ok with this then so am I. Yep. Applied with just a minor change to the ChangeLog entry. Thanks. Attn maintainers: If package with dirent.d_type support is rebuild with new sys/dirent.h, it is

[Patch] Avoid duplicate names in /proc/registry (which may crash find)

2008-12-04 Thread Christian Franke
. Christian 2008-12-04 Christian Franke [EMAIL PROTECTED] * fhandler_registry.cc (__DIR_hash): New class. (d_hash): New macro. (key_exists): New function. (fhandler_registry::readdir): Allocate __DIR_hash. Record key names in hash table. Skip value if key

Re: [Patch] Avoid duplicate names in /proc/registry (which may crash find)

2008-12-07 Thread Christian Franke
and allows access to the (very few) entries with duplicate names. The %val is at least somewhat self-explanatory. Cool. Can you please send a ChangeLog entry as well? Of course: 2008-12-07 Christian Franke [EMAIL PROTECTED] * fhandler_registry.cc (encode_regname): Add Parameter

Re: [Patch] Avoid duplicate names in /proc/registry (which may crash find)

2008-12-11 Thread Christian Franke
% handling. Maybe it would be helpful to break out an entire (small) section for the /proc/registry access... 2008-12-11 Christian Franke fra...@computer.org * pathnames.sgml: New section for /proc/registry. Document registry name encoding. Christian diff --git a/winsup

Re: [Patch] Avoid duplicate names in /proc/registry (which may crash find)

2008-12-12 Thread Christian Franke
Corinna Vinschen wrote: On Dec 12 09:17, Eric Blake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Corinna Vinschen on 12/12/2008 9:13 AM: @ for the named value, and %.val for the unnamed default? Backward compatibility would ask for sticking to @ for the

Re: [Patch] Avoid duplicate names in /proc/registry (which may crash find)

2008-12-13 Thread Christian Franke
Corinna Vinschen wrote: On Dec 12 18:32, Christian Franke wrote: Why not encode @ as a reserved name like it is already done for . and .. (which appear as %2E and %2E.)? This would provide backward compatibility and consistency with current conversions: @ - default value %40 - named key

Re: [Patch] Avoid duplicate names in /proc/registry (which may crash find)

2008-12-15 Thread Christian Franke
Corinna Vinschen wrote: On Dec 13 14:37, Christian Franke wrote: 2008-12-13 Christian Franke fra...@computer.org * fhandler_registry.cc (DEFAULT_VALUE_NAME): Remove constant. (encode_regname): Encode empty (default) name to @. Encode @ to %40. Change error return

[Patch] Allow access to /proc/registry/HKEY_PERFORMANCE_DATA

2008-12-19 Thread Christian Franke
\Perflib are not considered yet. 2008-12-19 Christian Franke fra...@computer.org * fhandler_registry.cc (perf_data_files): New table. (PERF_DATA_FILE_COUNT): New constant. (fhandler_registry::exists): Add check for HKEY_PERFORMANCE_DATA value names

Re: [Patch] Allow access to /proc/registry/HKEY_PERFORMANCE_DATA

2008-12-19 Thread Christian Franke
Chris January wrote: On Fri, Dec 19, 2008 at 1:58 PM, Christian Franke wrote: (fhandler_registry::fill_filebuf): Use larger buffer to speed up access to HKEY_PERFORMANCE_DATA values. Remove check for possible subkey. Add RegCloseKey

[Patch] Allow to disable root privileges with CYGWIN=noroot

2009-08-29 Thread Christian Franke
For members of administrator group, Cygwin runs with root access rights. Cygwin enables the Windows backup and restore privileges which are not enabled by default. This is IMO not desirable under all circumstances. This patch adds a new flag to the Cygwin environment variable. If

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-08-29 Thread Christian Franke
Corinna Vinschen wrote: - On all older systems you shouldn't work as admin by default anyway, especially not on Windows XP. And then, *if* you're running an admin session, you usually want admin rights. What's the advantage of faking you don't have these rights? *If* running an

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-08-30 Thread Christian Franke
Corinna Vinschen wrote: If you plan to run a Cygwin application with restricted rights from your administrative account, the IMHO right way would be to start the Cygwin application through another application which creates a *really* restricted user token using the Win32 function

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-10-04 Thread Christian Franke
Hi Corinna, Corinna Vinschen wrote: New patch attached. I made the test a bit more foolproof, hopefully. And a restricted token does not require to load the user's registry hive, nor should Cygwin try to enable the backup/restore permissions in the new token. That spoils the idea of a

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-10-09 Thread Christian Franke
. http://sourceware.org/ml/cygwin/2009-09/msg00138.html Christian 2009-10-09 Christian Franke fra...@computer.org Corinna Vinschen cori...@vinschen.de * include/sys/cygwin.h: Add new cygwin_getinfo_type CW_SET_EXTERNAL_TOKEN. Add new enum CW_TOKEN_IMPERSONATION

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-10-11 Thread Christian Franke
. If seteuid(geteuid()) is called, the behaviour is similar to the ruid != euid case: The exec()ed process can revert to the original token. Christian 2009-10-11 Christian Franke fra...@computer.org Corinna Vinschen cori...@vinschen.de * include/sys/cygwin.h: Add new

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-10-13 Thread Christian Franke
Corinna Vinschen wrote: Patch checked in. Thanks. Thanks for doing this. Would you have fun to provide a tool for the net distro which uses this feature? A first try is attached. cygdrop command ... -- Drop admin group and most privileges and run command. cygdrop -b command ... --

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-10-14 Thread Christian Franke
Corinna Vinschen wrote: Cool. Another interesting option could be to remove the domain admins group as well, if the user is a domain user and, of course, removing any single user right, similar to the capsh tool under SELinux. Yes, makes sense. I'm just not sure if that tool should be

Re: [Patch] Allow to disable root privileges with CYGWIN=noroot

2009-11-21 Thread Christian Franke
Christian Franke wrote: Charles Wilson wrote: I've no objections to incorporating this/these utilities into cygutils. Take a look at http://cygwin.com/cgi-bin/cvsweb.cgi/cygutils/HOW-TO-CONTRIBUTE?rev=1.11cvsroot=cygwin-apps to see how best to integrate the tool(s) into cygutils. I

[PATCH] Ensure that the default ACL contains the standard entries

2010-12-10 Thread Christian Franke
://cygwin.com/ml/cygwin/2010-11/msg00429.html The logic for DEF_CLASS_OBJ is unchanged. Christian 2010-12-10 Christian Franke fra...@computer.org * sec_acl.cc (getacl): Ensure that the default acl contains at least DEF_(USER|GROUP|OTHER)_OBJ entries. diff --git a/winsup/cygwin/sec_acl.cc b/winsup

Re: [PATCH] Ensure that the default ACL contains the standard entries

2010-12-15 Thread Christian Franke
Corinna Vinschen wrote: New patch attached. Thanks, applied. Thanks - rsync issue is now fixed. mkdir() may duplicate Windows ACL entries. Testcase (German XP SP3): [...] Problem in security.cc:alloc_sd() ? Indeed. Thanks for the report. I fixed that in CVS, hopefully.

[PATCH] Fix bogus fsync() error

2011-01-31 Thread Christian Franke
which likely would return other error codes. An alternative approach would be to ignore the error only in a new fhandler_raw_dev/floppy::fsync(). IMO not worth the effort is this case. Christian 2011-01-31 Christian Franke fra...@computer.org * fhandler.cc (fhandler_base::fsync): Ignore

[PATCH] False positive from access(/proc/registry/..., F_OK)

2011-05-04 Thread Christian Franke
Corinna Vinschen wrote: On Apr 27 12:26, Christian Franke wrote: access(/proc/registry/..., F_OK) returns 0 for all (including nonexistent) entries below a registry key which cannot be opened: ... Problem was likely introduced by fhandler_registry.cc change 1.52: fhandler_registry

[PATCH] Fix access(/proc/registry/HKEY_PERFORMANCE_DATA, R_OK)

2011-05-05 Thread Christian Franke
This patch fixes access(/proc/registry/HKEY_PERFORMANCE_DATA, R_OK) which always fails with EBADF. Christian 2011-05-05 Christian Franke fra...@computer.org * security.cc (check_registry_access): Handle missing security descriptor of HKEY_PERFORMANCE_DATA. diff --git a/winsup/cygwin

Re: [PATCH] Fix access(/proc/registry/HKEY_PERFORMANCE_DATA, R_OK)

2011-05-05 Thread Christian Franke
Corinna Vinschen wrote: On May 5 18:51, Christian Franke wrote: This patch fixes access(/proc/registry/HKEY_PERFORMANCE_DATA, R_OK) which always fails with EBADF. Christian 2011-05-05 Christian Franke... * security.cc (check_registry_access): Handle missing

Re: [PATCH] Fix access(/proc/registry/HKEY_PERFORMANCE_DATA, R_OK)

2011-05-10 Thread Christian Franke
Corinna Vinschen wrote: Yeah, right. On second thought that looks much better. Please check in. Done Christian

[PATCH] Prevent restart of crashing non-Cygwin exe

2011-06-23 Thread Christian Franke
aborts with an unknown 0xc exit code also for non-Cygwin programs. The attached patch fixes this. Christian 2011-06-23 Christian Franke fra...@computer.org * sigproc.cc (child_info::sync): Add exit_code to debug message. (child_info::proc_retry): Don't retry on unknown exit_code

[PATCH] Allow usage of union wait for wait() functions and macros

2011-10-05 Thread Christian Franke
fixes this. It uses GCC extensions for C and overloading for C++. Works also with the old Cygwin gcc-3. Christian 2011-10-05 Christian Franke fra...@computer.org * include/cygwin/wait.h: Use new __wait_status_to_int() macro to access status value in W*() status checks. * include/sys/wait.h

Re: [PATCH] Allow usage of union wait for wait() functions and macros

2011-10-05 Thread Christian Franke
Christopher Faylor wrote: On Wed, Oct 05, 2011 at 12:57:44PM +0200, Christian Franke wrote: ... diff --git a/winsup/cygwin/include/cygwin/wait.h b/winsup/cygwin/include/cygwin/wait.h index bed81b7..e4edba2 100644 --- a/winsup/cygwin/include/cygwin/wait.h +++ b/winsup/cygwin/include/cygwin

Re: [PATCH] Allow usage of union wait for wait() functions and macros

2011-10-06 Thread Christian Franke
Christopher Faylor wrote: On Wed, Oct 05, 2011 at 11:17:58PM +0200, Christian Franke wrote: Christopher Faylor wrote: On Wed, Oct 05, 2011 at 12:57:44PM +0200, Christian Franke wrote: ... diff --git a/winsup/cygwin/include/cygwin/wait.h b/winsup/cygwin/include/cygwin/wait.h index bed81b7

Re: [PATCH] Allow usage of union wait for wait() functions and macros

2011-10-06 Thread Christian Franke
Christopher Faylor wrote: On Thu, Oct 06, 2011 at 01:03:41PM +0200, Christian Franke wrote: ... OK, __INSIDE_CYGWIN__ is not needed here in practice (but possibly in theory :-) I would rather see as little __INSIDE_CYGWIN__ as possible in external headers. OK, removed and Cygwin compilation

Re: [PATCH] Prevent restart of crashing non-Cygwin exe

2011-11-02 Thread Christian Franke
On Jun 24, Corinna Vinschen wrote: Hi Christian, On Jun 23 19:52, Christian Franke wrote: If a non-Cygwin .exe started from a Cygwin shell window segfaults, Cygwin restarts the .exe 5 times. [...l] * sigproc.cc (child_info::sync): Add exit_code to debug message

Re: [PATCH] Prevent restart of crashing non-Cygwin exe

2011-11-05 Thread Christian Franke
Christopher Faylor wrote: On Thu, Nov 03, 2011 at 01:07:20PM +0100, Corinna Vinschen wrote: On Nov 2 20:53, Christian Franke wrote: On Jun 24, Corinna Vinschen wrote: Hi Christian, On Jun 23 19:52, Christian Franke wrote: If a non-Cygwin .exe started from a Cygwin shell window segfaults

Re: Problem with: Re: [PATCH] Allow usage of union wait for wait() functions and macros

2011-12-07 Thread Christian Franke
Christopher Faylor wrote: I guess this is why there was a __INSIDE_CYGWIN__ test. Christian, could you submit a new patch to rectify this problem? OK, will try soon. ... /usr/local/src/trunk/objdir.withada/./prev-gcc/g++ -B/usr/local/src/trunk/objdir.withada/./prev-gcc/ ...

Re: Problem with: Re: [PATCH] Allow usage of union wait for wait() functions and macros

2011-12-07 Thread Christian Franke
Christopher Faylor wrote: On Thu, Dec 08, 2011 at 12:17:11AM +0100, Christian Franke wrote: Christopher Faylor wrote: ... /usr/local/src/trunk/objdir.withada/./prev-gcc/g++ -B/usr/local/src/trunk/objdir.withada/./prev-gcc/ ... -I/usr/local/src/trunk/gcc/gcc/../libdecnumber/bid -I

Re: Problem with: Re: [PATCH] Allow usage of union wait for wait() functions and macros

2011-12-08 Thread Christian Franke
Christopher Faylor wrote: On Thu, Dec 08, 2011 at 07:42:48AM +0100, Christian Franke wrote: Fix: #ifdef __cplusplus +extern C++ { ... inline int __wait_status_to_int(int __status) { } inline int __wait_status_to_int(const union wait__status) { } ... +} #endif I've added that to sys

Re: avoid calling strlen() twice in readlink()

2012-03-08 Thread Christian Franke
Corinna Vinschen wrote: On Mar 8 08:29, Eric Blake wrote: On 03/08/2012 06:37 AM, Václav Zeman wrote: Hi. Here is a tiny patch to avoid calling strlen() twice in readlink(). - ssize_t len = min (buflen, strlen (pathbuf.get_win32 ())); + size_t pathbuf_len = strlen (pathbuf.get_win32 ());

Re: [PATCH] Setting TZ may break time() in non-Cygwin programs

2012-04-11 Thread Christian Franke
On Mar 4, Corinna Vinschen wrote: On Mar 4 19:42, Christian Franke wrote: Corinna Vinschen wrote: On Mar 2 22:35, Christian Franke wrote: Corinna Vinschen wrote: But, as usual, PTC. OK, ... Simple: Unset TZ for Win32 programs run from Cygwin. More flexible: Set (unset) TZ

Re: [PATCH] Setting TZ may break time() in non-Cygwin programs

2012-04-17 Thread Christian Franke
Christopher Faylor wrote: On Tue, Apr 17, 2012 at 09:06:15AM +0200, Corinna Vinschen wrote: On Apr 11 20:52, Christian Franke wrote: Yes. Patch is attached. Christian Thanks for the patch. I'm just wondering if we shouldn't generalize this right from the start by keeping an array

[PATCH] cygcheck -m, --check-mtimes option

2014-08-07 Thread Christian Franke
Attached is an experimental patch which adds -m, --check-mtimes[=SECONDS] option to cygcheck. It provides an IMO useful heuristics to find files possibly modified after installation. cygcheck -c -m prints the number of files with st_mtime INSTALL_TIME+SECONDS. INSTALL_TIME is the st_mtime of

Re: [PATCH] cygcheck -m, --check-mtimes option

2014-08-13 Thread Christian Franke
Hi Corinna, Corinna Vinschen wrote: On Aug 8 12:31, Corinna Vinschen wrote: Hi Christian, On Aug 7 22:15, Christian Franke wrote: Attached is an experimental patch which adds -m, --check-mtimes[=SECONDS] option to cygcheck. It provides an IMO useful heuristics to find files possibly

[PATCH] Fix crash of ffs (0x80000000) on 64 bit

2014-09-23 Thread Christian Franke
This fixes the issue reported here: https://cygwin.com/ml/cygwin/2014-09/msg00341.html On 64 bit, i = 0x8000 results in x = 0x8000 due to sign extension. Christian 2014-09-23 Christian Franke fra...@computer.org * syscall.cc (ffs): Fix crash of ffs (0x8000) on 64 bit

[PATCH] Disable AF_UNIX handshake with setsockopt(..., SO_PEERCRED, ...)

2014-09-25 Thread Christian Franke
); Postfix works if socket() calls are replaced by the above. Calls of getsockopt(..., SO_PEERCRED, ...) and getpeereid() would fail with ENOTSUP then. These are not used by postfix. Christian 2014-09-25 Christian Franke fra...@computer.org Add setsockopt(sd, SOL_SOCKET, SO_PEERCRED, NULL, 0

Re: [PATCH] Disable AF_UNIX handshake with setsockopt(..., SO_PEERCRED, ...)

2014-10-09 Thread Christian Franke
Corinna Vinschen wrote: +int +fhandler_socket::af_local_set_no_getpeereid () +{ + if (get_addr_family () != AF_LOCAL || get_socket_type () != SOCK_STREAM) +{ + set_errno (EINVAL); + return -1; +} + if (connect_state () != unconnected)

Re: [PATCH] Disable AF_UNIX handshake with setsockopt(..., SO_PEERCRED, ...)

2014-10-10 Thread Christian Franke
Corinna Vinschen wrote: I was just looking into applying your patch when I got thinking over the change in select.cc once more. You're setting the connect_state from connect_pending to connected there when there's something to read on the socket. This puzzles me. A completed connection

Re: [PATCH] Hide sethostname() in unistd.h

2015-06-18 Thread Christian Franke
Corinna Vinschen wrote: On Jun 17 15:15, Eric Blake wrote: On 06/17/2015 02:57 PM, Yaakov Selkowitz wrote: On Wed, 2015-06-17 at 22:25 +0200, Christian Franke wrote: Busybox does not use autoconf or similar. It requires manual platform specific configuration which does not yet support

Re: [PATCH] Hide sethostname() in unistd.h

2015-06-17 Thread Christian Franke
Corinna Vinschen wrote: On Jun 17 07:38, Christian Franke wrote: Corinna Vinschen wrote: On Jun 16 18:27, Christian Franke wrote: Found during an experimental build of busybox: The sethostname() prototype in /usr/include/sys/unistd.h is enabled also on Cygwin. It should be disabled because

Re: [PATCH] Hide sethostname() in unistd.h

2015-06-16 Thread Christian Franke
Corinna Vinschen wrote: On Jun 16 18:27, Christian Franke wrote: Found during an experimental build of busybox: The sethostname() prototype in /usr/include/sys/unistd.h is enabled also on Cygwin. It should be disabled because Cygwin does not provide this function. Christian What about

Re: [PATCH] Cygwin: Fix access to block devices below /proc/sys.

2020-11-30 Thread Christian Franke
Corinna Vinschen wrote: On Nov 28 22:59, Christian Franke wrote: ... The attached experimental patch does not fix the lseek() (sorry), but handles such block devices with fhandler_dev_floppy instead. Tested with above use cases. I'm not sure whether this could break access to other /proc/sys

Re: [PATCH] Cygwin: Fix access to block devices below /proc/sys.

2020-12-01 Thread Christian Franke
Corinna Vinschen wrote: On Dec 1 16:59, Christian Franke wrote: Corinna Vinschen wrote: \Device\Mup is a character device and thus the devices below are not accessible for directory enumeration. I assume it's the same for DFS. Here I see \Device\Mup as a block device on two systems (cygwin1

[PATCH] Cygwin: Fix access to block devices below /proc/sys.

2020-11-28 Thread Christian Franke
on Sep 17 00:00:00 2001 From: Christian Franke Date: Sat, 28 Nov 2020 22:09:23 +0100 Subject: [PATCH] Cygwin: Fix access to block devices below /proc/sys. Use fhandler_dev_floppy instead of fhandler_procsys for such devices. The read()/write() functions from fhandler_procsys do not ensure sector a

Re: [PATCH] Cygwin: Fix access to block devices below /proc/sys.

2020-12-01 Thread Christian Franke
Corinna Vinschen wrote: On Nov 30 15:04, Corinna Vinschen wrote: On Nov 30 13:49, Christian Franke wrote: Corinna Vinschen wrote: On Nov 28 22:59, Christian Franke wrote: ... The attached experimental patch does not fix the lseek() (sorry), but handles such block devices

PATCH] Cygwin: utils: chattr: Allow to clear all attributes with '='.

2021-05-20 Thread Christian Franke
'chattr = FILE' is shorter that 'chattr -rhsat... FILE' :-) Regards, Christian From 41c1a9648d46835354167a7e024e7191014e1370 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu, 20 May 2021 22:52:28 +0200 Subject: [PATCH] Cygwin: utils: chattr: Allow to clear all attributes

Re: PATCH] Cygwin: utils: chattr: Allow to clear all attributes with '='.

2021-05-21 Thread Christian Franke
Corinna Vinschen wrote: On May 20 23:04, Christian Franke wrote: 'chattr = FILE' is shorter that 'chattr -rhsat... FILE' :-) That's ok, but it might be worth to add this to the docs, too :) Next try attached... From 6ba0ab483f9417631a1592210141aefaff50ebc1 Mon Sep 17 00:00:00 2001 From

Re: [PATCH] Cygwin: utils: chattr: Improve option parsing.

2021-05-20 Thread Christian Franke
Corinna Vinschen wrote: Hi Christian, On May 19 17:46, Christian Franke wrote: ... $ egrep 'ACL|--r' chattr.c   "Get POSIX ACL information\n"   "  -R, --recursive recursively list attributes of directories and their \n" Oops. Please patch while you're

[PATCH] Cygwin: utils: chattr: Improve option parsing.

2021-05-19 Thread Christian Franke
of directories and their \n" Regards, Christian From 865a5a50501f3fd0cf5ed28500d3e6e45a6456de Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Wed, 19 May 2021 16:24:47 +0200 Subject: [PATCH] Cygwin: utils: chattr: Improve option parsing. Interpret '-h' as '--help' only if last argu

Re: [PATCH] Cygwin: utils: chattr: Improve option parsing.

2021-05-20 Thread Christian Franke
Hi Corinna, Corinna Vinschen wrote: Hi Christian, On May 20 12:01, Christian Franke wrote: Corinna Vinschen wrote: On May 19 17:46, Christian Franke wrote: ... $ egrep 'ACL|--r' chattr.c   "Get POSIX ACL information\n"   "  -R, --recursive recursively

[PATCH] Add initial support for SOURCE_DATE_EPOCH

2023-09-05 Thread Christian Franke
would support SOURCE_DATE_EPOCH directly. -- Regards, Christian From b877330d53b95a88f1aef0fa3d14e97910d9dd2a Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 5 Sep 2023 18:32:49 +0200 Subject: [PATCH] Add initial support for SOURCE_DATE_EPOCH If specified, set version timestamp

Re: [PATCH] Add initial support for SOURCE_DATE_EPOCH

2023-09-10 Thread Christian Franke
and release tarballs ... On Sep  5 19:01, Christian Franke wrote: This patch enables reproducible builds of cygwin package in conjunction with this cygport patch: https://sourceware.org/pipermail/cygwin-apps/2023-August/043108.html ... the above cygport patch is also required. -- Regards

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Christian Franke
Corinna Vinschen wrote: On Nov 3 10:55, Corinna Vinschen wrote: Hi Christian, On Oct 3 14:39, Christian Franke wrote: Christian Franke wrote: This is a first attempt to partly emulate the Linux directory /dev/disk/by-id. Useful to make sure the correct device is accessed in conjunction

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Christian Franke
Corinna Vinschen wrote: On Nov 3 12:10, Corinna Vinschen wrote: On Nov 3 11:09, Corinna Vinschen wrote: On Nov 3 10:55, Corinna Vinschen wrote: On Oct 3 14:39, Christian Franke wrote: According to NtQueryObject(., ObjectBasicInformation, ...), using NtOpenFile(., MAXIMUM_ALLOWED

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-03 Thread Christian Franke
Corinna Vinschen wrote: On Nov 3 17:27, Corinna Vinschen wrote: On Nov 3 17:09, Christian Franke wrote: Unlike (S)ATA and NVMe, the serial number is not available for free in the device identify data block but requires an extra command (SCSI INQUIRY of VPD page 0x80). This might

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-04 Thread Christian Franke
Corinna Vinschen wrote: On Nov 4 10:34, Corinna Vinschen wrote: On Nov 3 18:54, Christian Franke wrote: ... Conclusion: The behavior of the current patch is compatible with Linux :-) Ok, but with the DUID we have a workaround which makes it work even better than on Linux, so it would

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-05 Thread Christian Franke
ive (Cygwin specific: drive letter -> volume)   c -> ../by-uuid/UUID (if UUID available)   x -> /proc/sys/DosDevices/X: (others, e.g. Network, "mounted" Volume Shadow Copy) Christian From aa8c35e041ffe5a4b06104c122d9ba1fdc492683 Mon Sep 17 00:00:00 2001 From: Christian Franke

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-07 Thread Christian Franke
Corinna Vinschen wrote: Hi Christian, On Nov 5 16:45, Christian Franke wrote: ... Old IOCTL dropped and code simplified. Great. I pushed your patch. Thanks. ... Last, but not least, do you see a chance to add any other /dev/disk subdir? by-partuuid, perhaps? Possibly, but not very

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-07 Thread Christian Franke
b07de21461207a2b57465d3dd8f7db2b36d886c0 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 7 Nov 2023 15:25:54 +0100 Subject: [PATCH] Cygwin: Document /dev/disk/by-id and /dev/disk/by-partuuid Signed-off-by: Christian Franke --- winsup/cygwin/release/3.5.0 | 6 ++ winsup/doc/new

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-11-04 Thread Christian Franke
Corinna Vinschen wrote: On Nov 4 10:34, Corinna Vinschen wrote: On Nov 3 18:54, Christian Franke wrote: ... MSDN claims: If the storage device is SCSI-compliant, the port driver attempts to extract the serial number from the optional Unit Serial Number page (page 0x80

Re: [PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-10-03 Thread Christian Franke
Christian Franke wrote: This is a first attempt to partly emulate the Linux directory /dev/disk/by-id. Useful to make sure the correct device is accessed in conjunction with dd, ddrescue, fdisk, Attached is the second attempt. The additional '*-partN' links to partitions are not yet

[PATCH] Cygwin: Add /dev/disk/by-id symlinks

2023-09-25 Thread Christian Franke
generated file devices.cc are not included in the patch. -- Regards, Christian From 8a49ae067cfd318746e6fe332b8775011658d780 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Mon, 25 Sep 2023 13:24:40 +0200 Subject: [PATCH] Cygwin: Add /dev/disk/by-id symlinks The new directory '/dev/disk/by-id

[PATCH] Cygwin: /dev/disk/by-id: Remove leading spaces from identify fields

2023-11-08 Thread Christian Franke
Minor improvement, avoids "/dev/disk/by-id/sata-VENDOR_MODEL___SERIAL". -- Regards, Christian From 9927cd46435da97d234b0c7e97b5fc2a9b7632d1 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Wed, 8 Nov 2023 17:03:57 +0100 Subject: [PATCH] Cygwin: /dev/disk/by-id: Remove lead

[PATCH htdocs] Align setup help text in FAQ with setup 2.919

2022-07-07 Thread Christian Franke
Not sure whether cygwin-patches is the correct list for this patch, cygwin-htdocs is not mentioned in lists.html. -- Regards, Christian From 2e5265577aa4926f3672c6f6ce248d09441bdd92 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu, 7 Jul 2022 11:57:34 +0200 Subject: [PATCH] Align

Re: [PATCH htdocs] Align setup help text in FAQ with setup 2.919

2022-07-07 Thread Christian Franke
Corinna Vinschen wrote: On Jul 7 12:08, Christian Franke wrote: Not sure whether cygwin-patches is the correct list for this patch, cygwin-htdocs is not mentioned in lists.html. The FAQ is part of the Cygwin source, just clone the repo and create the patch against winsup/doc/faq*.xml

Re: [PATCH rebase] Add support for Compact OS compression for Cygwin

2022-07-14 Thread Christian Franke
Corinna Vinschen wrote: On Jul 14 12:02, Christian Franke wrote: [Sorry if this is the wrong list] Yes, in theorie, but no worries. However... What is the correct list in theory ?-) From 807ae9fbaef18491f3aa1e94e66dd21eb6748c3e Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu

[PATCH rebase] Add support for Compact OS compression for Cygwin

2022-07-14 Thread Christian Franke
[Sorry if this is the wrong list] This finally completes '--compact-os' support of Cygwin setup. https://sourceware.org/pipermail/cygwin-apps/2021-May/041225.html -- Regards Christian From 807ae9fbaef18491f3aa1e94e66dd21eb6748c3e Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu, 14

Re: [PATCH rebase] Add support for Compact OS compression for Cygwin

2022-07-14 Thread Christian Franke
Corinna Vinschen wrote: On Jul 14 14:12, Christian Franke wrote: +#endif This ifdef still makes sense, of course ... Could possibly also be enhanced to __MSYS__ and msys1.dll. Not sure this makes sense. Does their installer support CompactOS? No, AFIAK. Then only (nonexistent?) users who

[PATCH] Cygwin: introduce close_range

2024-01-14 Thread Christian Franke
his :-) -- Regards, Christian From 2393e82a62e19e29e61ef3253e227c19ae7222eb Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sun, 14 Jan 2024 16:54:17 +0100 Subject: [PATCH] Cygwin: introduce close_range This function closes or sets the close-on-exec flag for a specified range of file descripto

Re: [PATCH] Cygwin: introduce close_range

2024-01-14 Thread Christian Franke
Jon Turney wrote: On 14/01/2024 16:07, Christian Franke wrote: Recently I learned about the existence and usefulness of close_range(): https://github.com/smartmontools/smartmontools/issues/235 https://man.freebsd.org/cgi/man.cgi?query=close_range=2 https://man7.org/linux/man-pages/man2

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Christian Franke
Christian Franke wrote: Jon Turney wrote: On 14/01/2024 16:07, Christian Franke wrote: Recently I learned about the existence and usefulness of close_range(): https://github.com/smartmontools/smartmontools/issues/235 https://man.freebsd.org/cgi/man.cgi?query=close_range=2 https://man7.org

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Christian Franke
Corinna Vinschen wrote: Hi Christian, On Jan 15 09:56, Christian Franke wrote: Christian Franke wrote: Jon Turney wrote: On 14/01/2024 16:07, Christian Franke wrote: Recently I learned about the existence and usefulness of close_range(): https://github.com/smartmontools/smartmontools/issues

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Christian Franke
Corinna Vinschen wrote: On Jan 15 13:07, Corinna Vinschen wrote: Sorry Christian, but.. I was just going to push this patch when I realized that we now have two lines of debug output per affected file descriptor: On Jan 15 12:19, Christian Franke wrote: + for (unsigned int i = firstfd; i

  1   2   >