sunrpc patch that fixes nfs-server initialization timeouts
This patch fixes the problem that is causing the following error message: Cannot register service: RPC: Timed out rpcmisc.c 99 : unable to register The problem is described here: http://cygwin.com/ml/cygwin/2004-08/msg00900.html http://cygwin.com/ml/cygwin/2013-06/msg00304.html Sunrpc uses an ioctl to get the local IP address of the machine. This is error prone and in case you have more than one network interfaces it will most probably not work. A better alternative would be to use the loopback address (127.0.0.1). The procedure to apply the patch is the following: * Download source packages nfs-server and sunrpc. * Execute use_loopback.sh -- George Prekas Dipl. Electrical and Computer Engineer, National Technical University of Athens--- a/etc/portmap.c +++ b/etc/portmap.c @@ -52,7 +52,6 @@ static char sccsid[] = @(#)portmap.c 1.32 87/08/06 Copyr 1984 Sun Micro; static callit(); -char *malloc(); int reg_service(); void reap(); struct pmaplist *pmaplist; diff --git a/rpc/xdr.c b/rpc/xdr.c index e9c8382..f370b10 100644 --- a/rpc/xdr.c +++ b/rpc/xdr.c @@ -42,7 +42,6 @@ static char sccsid[] = @(#)xdr.c 1.35 87/08/12; */ #include stdio.h -char *malloc(); #include rpc/types.h #include rpc/xdr.h --- a/rpc/get_myaddress.c +++ b/rpc/get_myaddress.c @@ -53,38 +53,7 @@ static char sccsid[] = @(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro; get_myaddress(addr) struct sockaddr_in *addr; { - int s; - char buf[BUFSIZ]; - struct ifconf ifc; - struct ifreq ifreq, *ifr; - int len; - - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) 0) { - perror(get_myaddress: socket); - exit(1); - } - ifc.ifc_len = sizeof (buf); - ifc.ifc_buf = buf; - if (ioctl(s, SIOCGIFCONF, (char *)ifc) 0) { - perror(get_myaddress: ioctl (get interface configuration)); - exit(1); - } - ifr = ifc.ifc_req; - for (len = ifc.ifc_len; len; len -= sizeof ifreq) { - ifreq = *ifr; - if (ioctl(s, SIOCGIFFLAGS, (char *)ifreq) 0) { - perror(get_myaddress: ioctl); - exit(1); - } - if ((ifreq.ifr_flags IFF_UP) - ifr-ifr_addr.sa_family == AF_INET) { - *addr = *((struct sockaddr_in *)ifr-ifr_addr); - addr-sin_port = htons(PMAPPORT); - if (0 != addr-sin_addr.s_addr) { -break; - } - } - ifr++; - } - (void) close(s); + addr-sin_family = AF_INET; + addr-sin_addr.s_addr = htonl(INADDR_LOOPBACK); + addr-sin_port = htons(PMAPPORT); } use_loopback.sh Description: Bourne shell script
sunrpc patch that fixes nfs-server failure when reading files of specific sizes
Nfs-server occasionally fails when serving files of specific sizes. The Linux client reports an input/output error and the user has to umount and mount the NFS share in order to continue using it. The problem happens when the file's size is: 8192*k + 3896 or 8192*k + 3896 + 3996 where k = 0,1,2,... Example file sizes are: 3896, 7892, 12088, 16084 Sunrpc sends data in chunks and under some conditions it fails to recognize that it is sending the last chunk and does not set the corresponding flag (last fragment bit). The procedure to apply the patch is the following: * Download source packages nfs-server and sunrpc. * Execute fix_xdrrec_putbytes.sh -- George Prekas Dipl. Electrical and Computer Engineer, National Technical University of Athens fix_xdrrec_putbytes.sh Description: Bourne shell script fix_compile.patch.bin Description: Binary data fix_xdrrec_putbytes.patch.bin Description: Binary data
Re: cannot run setup64.exe without admin privileges (even if renamed foo.exe)
Hi Shaddy, any news? Thanks, Corinna On Oct 15 18:00, Corinna Vinschen wrote: On Oct 16 02:18, Shaddy Baddah wrote: On 15/10/13 23:22, Corinna Vinschen wrote: On Oct 15 21:21, Shaddy Baddah wrote: On 15/10/13 20:08, Corinna Vinschen wrote: [...] thanks for letting us know and your patch. I had a look and it looks good for a start. You just call the CheckTokenMembership function, though. The problem is, you won't know if the process has been started by a non-admin or by an admin without elevation. So you always call ShellExecute if setup is started without admin rights, for non-admins and non-elevated admins alike, unless the --no-admin option is given. Yes that is deliberate. Initially I coded this for how I viewed was desirable, that being that it would use CheckTokenMembership to see if it was elevated (or just run as Administrator on XP). If it was not, it would attempt to elevate using runas flag. If that was rejected, it would carry on. The --no-admin was still used as per the patch submitted to avoid infinite loop just in-case ShellExecuteEx didn't honour runas and just ran setup all over again with no Administrator rights. However I sensed from previous discussions that really it was desirable to steer users towards running as Admin/elevated privilege. Unless they really knew what they were doing. So much so that building a custom setup.exe was being recommended without much discussion of an alternative... until now. So this patch tries to be as backwards compatible as possible. That is, unless the user has already explicitly elevated privilege (context menu - Run as ...), setup.exe forces an attempt. And fails if it does not elevate. The forced attempt can be avoided by explicitly specifying --no-admin. Yeah, that makes sense. The patch I provided doesn't match exactly the behaviour of setup on various systems at the moment, in the following ways: * I don't know how, and did not bother too much about emulating the access denied when the user rejects the privilege elevation. I don't think that much of a problem. If the user refuses the elevation, setup won't run. That's as much message as one needs, I think. * Under x86 (32bit), where the user has performed the rename magic that normally circumvents the UAC Installer Detection Technology, setup will still behave as if they hadn't and continue to try to elevate. IMO this is minor, but if we were going for 100% compatibility, we could check the exe filename against the same list that cygports uses, and avoid the privilege elevation attempt: /usr/share/cygport/lib/src_postinst.cygpart:1112: find * -type f -executable -a \( -name '*instal*.exe' -o -name '*patch*.exe' -o -name '*setup*.exe' -o -name '*update*.exe' \) -print0 | \ I don't know if that's really needed anymore. Your patch provides a nice workaround, the --no-admin option. * Under XP (32 bit... I don't know about any other archs (if they XP 64 bit exists :) exist?) or other XP like editions (server???)), for a non-Administrator the attempt to elevate privilege is also an extra behaviour that wouldn't have been normally encountered. Again, it may have been easy to detect that and do something about it too. XP and Server 2003 don't know the concept anyway, so calling GetVersion and skipping the entire elevation code if the result shows we're running on a pre-Vista system should do it. Something like this: if (LOWORD (GetVersion ()) = _WIN32_WINNT_VISTA) { ...do the elevate thingy... } Another bit of polish this patch needs is a effective way to close off logging once and for all when we are about to call ShellExecuteEx. Putting in the line: + l-msg.clear(); staved off the doubling up of logging when LogFile::exit was being called. But unfortunately a bunch of newlines where being logged instead. I never got around to knocking all that on the head. Hmm, that should be fixable. AFAICS, LogFile::log_save doesn't check if tstr is longer than 0: if (tstr[strlen (tstr) - 1] != '\n') f-write (\n, 1); Does it help to write the NL only if there was some non-empty string? if (strlen (tstr) 0 tstr[strlen (tstr) - 1] != '\n') f-write (\n, 1); ? Is that what we want? Or should the process only be elevated when started by a non-elevated admin as I proposed. I'm not sure, really. If I understand right, you were proposing that if the user was not an Admin at all, then just let them run as they were. As I wrote earlier, it seemed from discussion that it was desirable (if not pseudo policy) that regular Cygwin users run with privilege elevated. And knowing of various features built into setup that require elevated privilege, eg. replace on boot, I can see why that is. Yes, as I said, that makes sense. I think your approach is
Re: [ITP] gl2ps-1.38-1
On Nov 1 10:34, marco atzeri wrote: http://www.geuz.org/gl2ps/ An OpenGL to PostScript printing library GL2PS is a C library providing high quality vector output for any OpenGL application. The main difference between GL2PS and other similar libraries is the use of sorting algorithms capable of handling intersecting and stretched polygons, as well as non manifold objects. GL2PS provides advanced smooth shading and text rendering, culling of invisible primitives, mixed vector/bitmap output, and much more... ALready present in Fedora , Debian. Needed for next Octave 3.8.x release That's reason enough to add the package. Please go ahead. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat pgp7dCHyaMlNB.pgp Description: PGP signature
Re: sunrpc patch that fixes nfs-server failure when reading files of specific sizes
Il 11/4/2013 11:52 AM, George Prekas ha scritto: Nfs-server occasionally fails when serving files of specific sizes. The Linux client reports an input/output error and the user has to umount and mount the NFS share in order to continue using it. The problem happens when the file's size is: 8192*k + 3896 or 8192*k + 3896 + 3996 where k = 0,1,2,... Example file sizes are: 3896, 7892, 12088, 16084 Sunrpc sends data in chunks and under some conditions it fails to recognize that it is sending the last chunk and does not set the corresponding flag (last fragment bit). The procedure to apply the patch is the following: * Download source packages nfs-server and sunrpc. * Execute fix_xdrrec_putbytes.sh -- George Prekas Dipl. Electrical and Computer Engineer, National Technical University of Athens Hi George, unfortunately the nfs-server is without a package maintainer http://cygwin.com/cygwin-pkg-maint Are you interested to take over ? If so please look at http://cygwin.com/setup.html Regards MArco
Re: [ITP] cygcheck-leaves - a script to list installed packages not required by any
On Oct 31 12:34, Mikhail Usenko wrote: Thanks for the comment. I've forgotten to test the script on 32-bit Windows. Now it uses a bash-specific variable to determine the CPU type and should work OK. Also after some time of using I've completely rewritten it having added new functionality and renamed it to 'cygcheck-dep'. setup.hint: --- category: Utils requires: bash coreutils sed wget bzip2 sdesc: Show information on dependencies for installed Cygwin packages --- Neat. I toyed a bit with your script and I like it. This could come in handy to isolate installation problems. I uploaded the package. Please send an announcement along the lines of the existing announcements to the cygwin-announce list. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat pgpXaxDeIx9kr.pgp Description: PGP signature
Re: sunrpc patch that fixes nfs-server failure when reading files of specific sizes
On 11/4/2013 7:22 AM, marco atzeri wrote: Hi George, unfortunately the nfs-server is without a package maintainer http://cygwin.com/cygwin-pkg-maint Yes, but the patch is actually for sunrpc, of which I am (nominally) listed as the maintainer. There's an issue with sunrpc in general (I'll have to check my logs on that), but I'm saving a copy of George's patches for future use. George -- thanks for the testing and the patches. I can't predict how long it'll be until I can fold them in, but they will not be forgotten. I'm open to relinquishing sunrpc, rpcgen, and several other networking-related packages to a new maintainer if you're interested? (But, as you've noticed, they seem pretty interrelated so they ought to go to a common home without breaking up the family) -- Chuck
Re: [ITP] cygcheck-leaves - a script to list installed packages not required by any
On Mon, Nov 04, 2013 at 01:39:25PM +0100, Corinna Vinschen wrote: On Oct 31 12:34, Mikhail Usenko wrote: Thanks for the comment. I've forgotten to test the script on 32-bit Windows. Now it uses a bash-specific variable to determine the CPU type and should work OK. Also after some time of using I've completely rewritten it having added new functionality and renamed it to 'cygcheck-dep'. setup.hint: --- category: Utils requires: bash coreutils sed wget bzip2 sdesc: Show information on dependencies for installed Cygwin packages --- Neat. I toyed a bit with your script and I like it. This could come in handy to isolate installation problems. I uploaded the package. Please send an announcement along the lines of the existing announcements to the cygwin-announce list. This needs to be in cygwin-pkg-maint and we'll need information as per: https://sourceware.org/cygwin-apps/package-upload.html . Also, FWIW, this package didn't really go through the vetting process of getting the required number of votes. I don't object to it going in but I don't think we want to get into the habit of short circuiting published procedures without at least acknowledging that we are doing so for a reason.
Re: [ITP] cygcheck-leaves - a script to list installed packages not required by any
On Nov 4 12:45, Christopher Faylor wrote: On Mon, Nov 04, 2013 at 01:39:25PM +0100, Corinna Vinschen wrote: On Oct 31 12:34, Mikhail Usenko wrote: Thanks for the comment. I've forgotten to test the script on 32-bit Windows. Now it uses a bash-specific variable to determine the CPU type and should work OK. Also after some time of using I've completely rewritten it having added new functionality and renamed it to 'cygcheck-dep'. setup.hint: --- category: Utils requires: bash coreutils sed wget bzip2 sdesc: Show information on dependencies for installed Cygwin packages --- Neat. I toyed a bit with your script and I like it. This could come in handy to isolate installation problems. I uploaded the package. Please send an announcement along the lines of the existing announcements to the cygwin-announce list. This needs to be in cygwin-pkg-maint Did so while uploading. and we'll need information as per: https://sourceware.org/cygwin-apps/package-upload.html . Also, FWIW, this package didn't really go through the vetting process of getting the required number of votes. I don't object to it going in but I don't think we want to get into the habit of short circuiting published procedures without at least acknowledging that we are doing so for a reason. Well, it's just a small helper script and it looked useful enough, but you're right, of course. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat pgpa53etLydRj.pgp Description: PGP signature
Re: [ITP] cygcheck-leaves - a script to list installed packages not required by any
On Mon, Nov 04, 2013 at 06:54:03PM +0100, Corinna Vinschen wrote: On Nov 4 12:45, Christopher Faylor wrote: On Mon, Nov 04, 2013 at 01:39:25PM +0100, Corinna Vinschen wrote: On Oct 31 12:34, Mikhail Usenko wrote: Thanks for the comment. I've forgotten to test the script on 32-bit Windows. Now it uses a bash-specific variable to determine the CPU type and should work OK. Also after some time of using I've completely rewritten it having added new functionality and renamed it to 'cygcheck-dep'. setup.hint: --- category: Utils requires: bash coreutils sed wget bzip2 sdesc: Show information on dependencies for installed Cygwin packages --- Neat. I toyed a bit with your script and I like it. This could come in handy to isolate installation problems. I uploaded the package. Please send an announcement along the lines of the existing announcements to the cygwin-announce list. This needs to be in cygwin-pkg-maint Did so while uploading. Ah, I was looking for cygcheck-leaves. Nevermind. cgf