Re: gamin-0.1.7

2006-02-16 Thread Lapo Luchini
Yaakov S (Cygwin Ports) wrote:
 I'm curious, I don't see that any of the defined(__CYGWIN__) checks
 next to the defined(__FreeBSD__) checks in your patch.  Was that
 intentional?
Yes it was: those defines are about the cmsgcred socket credential
system, the first term of that test should always be false if there is
no struct cmsgcred in sys/socket.h

What do you think of the rest of the patch?
There are probably some things not strictly necessary (such as the
system to detect on what file system types to use kernel backend and on
what use polling, never called as I patched the function to always
return polling), but we first did a working FreeBSD patch and then
based the Cygwin patch on the same (managing only a smaller diff over
the other diff is easier).

   Lapo


Re: gamin-0.1.7

2006-02-16 Thread Corinna Vinschen
On Feb 15 16:09, Lapo Luchini wrote:
 Dave wrote:
  Turns out the code is fine. However note that this will only work on
  2000/XP and greater. GetVolumePathName is only available when
  _WIN32_WINNT=0x500
 Mhh, I know pretty much nothing about Win32 programming (that's why I
 love cygwin in the first place ^_^), I just copied that code by Yaakov
 (and him, in turn, from Corinna AFAIR).

http://cygwin.com/ml/cygwin-apps/2006-02/msg00012.html


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat


Re: gamin-0.1.7

2006-02-16 Thread Lapo Luchini
Corinna Vinschen wrote:
 http://cygwin.com/ml/cygwin-apps/2006-02/msg00012.html
   
Any I did reply, too.
I really got to finish this thesis *ASAP*, my brain has too many
underground processes -_-

Lapo


Re: gamin-0.1.7

2006-02-15 Thread Lapo Luchini
Dave wrote:
 if (strcmp(fsname, FAT) == 0)
 Had to change this to a strncmp(, , 3), but otherwise works perfectly.
 Seeing this and the messages about string vulnerabilities that are
 floating around, I thought I'd have a closer look at the function.
I didn't mean that I was forced to use strncmp instead of strcmp because
it was not secure, but that it simply wouldn't work otherwise: fsname
contains FAT32 on a FAT32 drive, so a strcmp with FAT would fail,
and rightly so.
Limiting to the first 3 chars allows to match any FAT* which is indeed
the right thing to do, IMHO (I don't think any member of the FAT
family has different features regarding permissions).
 Turns out the code is fine. However note that this will only work on
 2000/XP and greater. GetVolumePathName is only available when
 _WIN32_WINNT=0x500
Mhh, I know pretty much nothing about Win32 programming (that's why I
love cygwin in the first place ^_^), I just copied that code by Yaakov
(and him, in turn, from Corinna AFAIR).

Lapo


Re: gamin-0.1.7

2006-02-15 Thread Yaakov S (Cygwin Ports)

Lapo Luchini wrote:

OK, gamin-0.1.7 now *works* both on FreeBSD and CygWin.

I modified your package to use the new FreeBSD patchset, plus the
not_fat() thing you suggested above.


I'm curious, I don't see that any of the defined(__CYGWIN__) checks next 
to the defined(__FreeBSD__) checks in your patch.  Was that intentional?



Yaakov


Re: gamin-0.1.7

2006-02-14 Thread Dave

Lapo Luchini wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yaakov S (Cygwin Ports) wrote:

static int gamin_check_not_fat (void)


Nice.


if (strcmp(fsname, FAT) == 0)


Had to change this to a strncmp(, , 3), but otherwise works perfectly.


Seeing this and the messages about string vulnerabilities that are
floating around, I thought I'd have a closer look at the function.

Turns out the code is fine. However note that this will only work on
2000/XP and greater. GetVolumePathName is only available when
_WIN32_WINNT=0x500

9x, ME and NT will either need to figure out the root directory of the
volume some other way, or just CD to winpath and call GetVolumeInformation.


Dave


gamin-0.1.7

2006-02-13 Thread Lapo Luchini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yaakov S (Cygwin Ports) wrote:

 static int gamin_check_not_fat (void)

Nice.

 if (strcmp(fsname, FAT) == 0)

Had to change this to a strncmp(, , 3), but otherwise works perfectly.

 Alex already ported the patches to 0.1.7 but it seems that 0.1.7
 breaks polling itself, probably because there are no more linuxes
 without dnotify or inotify around, so the author didn't notice.
 We are investigating this problem, anyway.
 And it looks like FreeBSD has yet to figure it out themselves
 either, so at least we have good company. :-)

OK, gamin-0.1.7 now *works* both on FreeBSD and CygWin.

I modified your package to use the new FreeBSD patchset, plus the
not_fat() thing you suggested above.

Please do test it at will: to us it shows no regressions at all, only
failing test being #9 (the problem is that in FAT* changing the
content of a directory does not change the date of the directory itself).
We did not check Python-related things.

Lapo
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJD8KV3AAoJEJLw0EUVBG946oIP/ioN7WULLtTjxx7JVSzBm6NU
ph200ScGiet46BdQb3mpBKR7gmlKAPfFCHtF3w53prrbvmCRXBW3I/YY57M0nMlY
6m4i1gyqBZXdq3r5UCiUNOfDCX9FBdTA24jb/jdSIue5uXss+dMzZWL6oKiS9uZE
xvlAudtWQAvuG3f1tGe3eSgV8EuVDlUkJ2B1JgNPZimtZ6q7ACeUHP87VBUPT9an
kWFAAW9niyG7bAclUhOY22hOHJl0OQ2fX9uDis5KkqBwPW/aYzZWfONjU4tR8Gx9
IT+dDUvrobHyX3kadqWEu3sxBpHqNHt+vQxjIEd4fpg3PGDF7n6cW9nueMyqtwBz
e8BEOGJbWMhyAk1gIBdigAUiJkONPaXR6s+DGvMIt3BxFqKzyNuFTSzrVwEGDaGl
rZ4ifWai4azWQ5WqzotfNJTCsLxmYR1g9XVtM7+Jh8+VHq8s+bk2jYc+eoPee/Zj
HwZi5Eajo3RKXtjejCLw74TeLP3eiCJujjBXRuOZ6XiLG5ZhUpVvypCyaUk+KM0Y
2g4D49fhu590TbTpZcKmfVoL21tHvtWx86qbhKy5uYsxiC9xyX01GInp1fPmVJFw
87xlb+aZ6FD2KnDTMkynCmb5NLrH0CGPqK4jiZ8EdY/Wm7VDUaneRIKSsV56xpQO
sp1rUuP+iYabaW8fNGct
=bggG
-END PGP SIGNATURE-



Re: gamin-0.1.7

2006-02-13 Thread Lapo Luchini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lapo Luchini wrote:
 I modified your package to use the new FreeBSD patchset, plus the
  not_fat() thing you suggested above.
Silly me, here's the modifed package:
http://www.lapo.it/tmp/gamin-0.1.7-1-src.tar.bz2

SHA256 (gamin-0.1.7-1-src.tar.bz2) =
76c91e25c4e3b45ad82e07686ceb2c94
2f6cbc4b6ba773beab747c31d3ff885c

Lapo
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJD8KX3AAoJEJLw0EUVBG94sj8QAJ49VNwc1u45zod4kXRGsx+p
bWPbsvGPqGJqdwbAz+1zunj0fR5yi7JujIE1GEU7X6BfL5yPY0zAf1TCdD2Xoqag
moJn3H2KpPNdOhTXICLAmPy9HbjWQcTrlz0x8qFWi3X3oLeLw52BIpwSbq3TpRyl
EFoRa5qnNya8TGTGIIQDHC4OQ0mvZiqqdFq5J0n5en8SHAh2jEpeXQ3E1afoX9u5
+p43uOiminb7G/u/PAwArj7lLwk8AmIIxr9rM0+caeZkhRJZJ1dfpCUjVw2php+h
d+vIRhG6InBQ/rRw5IrZk+sgeMLbsonF7XL09zM6MTVtDeMW8pE7BhcLakay30Vo
1ve6eJQ2igH2uyE0VqfhL2HHDeurQJkkymHrJfG+tpimomdIKIybfUlBsY3NC1Ax
+vqA/tFhnC4nhI9Cg+q9cVROyjKv0EFJFIfopSoTSzBuJd+GJZavWy7/Vv/64Kdd
VlhOS4XmMOBJXFoyZxQDUkMlI4bzxeh6Ge90C7fsbSZJ+qA+ZISe33fsyBaDVgJS
DTZNg/b5dzvusbWsFvzr+XPYPiQqvH4PP7tVM02pPzdWTJ3Bq496Yf9VzHFmVeHY
zhPebZLv9Ro6jICsbt2jIVndUN23MElmXFr7NQ6yDrUGeCGKUu9TJNnvMN+m8m+7
eaTLjbIFLllV2Y/H81HZ
=5gWb
-END PGP SIGNATURE-