swprintf() & friends

2008-02-01 Thread Samuel Thibault
Hello,

We noticed that there is no swprintf and friends on cygwin (while mingw
has them), did anybody work on this or does it have to be done?

Samuel

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: swprintf() & friends

2008-02-01 Thread Corinna Vinschen
On Feb  1 10:18, Samuel Thibault wrote:
> Hello,
> 
> We noticed that there is no swprintf and friends on cygwin (while mingw
> has them), did anybody work on this or does it have to be done?

Newlib is missing these functions.  I'm not aware that somebody is
working on adding them.


Corinna

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

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Help with Make

2008-02-01 Thread Richard Head
Hi, first post in here.

Im not a very experienced C programmer, and Im fiddling with make. I
have the following make file (entitled Makefile):

fusionTK.exe : main.o fusionFileIO.o fusionAlgorithms.o
gcc main.o fusionFileIO.o fusionAlgorithms.o -o fusionTK.exe

main.o : main.c fusionDefs.h
gcc -c main.c fusionDefs.h

fusionFileIO.o: fusionFileIO.c fusionDefs.h
gcc -c fusionFileIO.c fusionDefs.h

fusionAlgorithms.o: fusionAlgorithms.c fusionDefs.h
gcc -c fusionAlgorithms.c fusionDefs.h

Which as far as I can tell is all well and good, but when I execute
make, it comes back with the error:
"make: *** No rule to make target `main.c', needed by `main.o'.
Stop."

have I put something in the wrong place?

Im running this on WinXP pro with cygwin installed.
Also, if I remove the main.c and fusionDefs.h from the main.o
dependencies, it runs the command associated with main.o :"gcc - c
main.c fusionDefs.h" and then complains that the gcc command is not
found. I can quite happily run GCC directly from the command line. 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Using msvcrt.lib from cygwin gcc

2008-02-01 Thread Anik Pal
What will be the make file syntax to use msvcrt.lib to compile my source
code in cygwin gcc?

Anik Pal
Vadodara, India



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help with Make

2008-02-01 Thread Alberto Luaces
El Friday 01 February 2008 12:38:30 Richard Head escribió:
> Hi, first post in here.
>
> Im not a very experienced C programmer, and Im fiddling with make. I
> have the following make file (entitled Makefile):
>
> fusionTK.exe : main.o fusionFileIO.o fusionAlgorithms.o
>         gcc main.o fusionFileIO.o fusionAlgorithms.o -o fusionTK.exe
>
> main.o : main.c fusionDefs.h
>         gcc -c main.c fusionDefs.h
>
> fusionFileIO.o: fusionFileIO.c fusionDefs.h
>         gcc -c fusionFileIO.c fusionDefs.h
>
> fusionAlgorithms.o: fusionAlgorithms.c fusionDefs.h
>         gcc -c fusionAlgorithms.c fusionDefs.h
>
> Which as far as I can tell is all well and good, but when I execute
> make, it comes back with the error:
> "make: *** No rule to make target `main.c', needed by `main.o'.
> Stop."
>
> have I put something in the wrong place?
>
> Im running this on WinXP pro with cygwin installed.
> Also, if I remove the main.c and fusionDefs.h from the main.o
> dependencies, it runs the command associated with main.o :"gcc - c
> main.c fusionDefs.h" and then complains that the gcc command is not
> found. I can quite happily run GCC directly from the command line.

Are you running make from Cygwin's shell or from the Windows command line 
shell instead?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help with Make

2008-02-01 Thread Richard Head

> 
> Are you running make from Cygwin's shell or from the Windows command line 
> shell instead?

Windows Command Line.

Ive just tried it in the Cygwin shell and I get the same first error. The 2nd
has gone away (It can find gcc now!)


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help with Make

2008-02-01 Thread Alberto Luaces
El Friday 01 February 2008 13:11:53 Richard Head escribió:
> > Are you running make from Cygwin's shell or from the Windows command line
> > shell instead?
>
> Windows Command Line.
>
> Ive just tried it in the Cygwin shell and I get the same first error. The
> 2nd has gone away (It can find gcc now!)

Good. It will save you from trouble to execute Cygwin programs from the Cygwin 
shell.

Now for the second: is main.c in the same directory as Makefile?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help with Make

2008-02-01 Thread Richard Head
How stupid of me. 
Main.c was in the wrong directory *slaps forehead*.

As for the gcc command not being found, that wasnt in the path, but now it is,
and its still not working. Odd. Maybe Ill just stick with the cywin shell



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help with Make

2008-02-01 Thread Richard Head
Right, I got it fixed and theres 2 things:

PKZIP had set up a user variable named PATH that was set to " "C:\Program
Files\PKWARE\PKZIPC\" " which was appended on the end of the system path. This
just repeated an earlier entry. 

Removing the "'s from the path let make find the correct path.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Help with Make

2008-02-01 Thread Dave Korn
On 01 February 2008 13:56, Richard Head wrote:

  Right, so...

> D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>gcc -v
> Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
> Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure
> --ver bose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
> --libdir=/usr/lib --libe xecdir=/usr/lib --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-langu
> ages=c,ada,c++,d,f77,pascal,java,objc --enable-nls
> --without-included-gettext -- enable-version-specific-runtime-libs
> --without-x --enable-libgcj --disable-java- awt --with-system-zlib
> --enable-interpreter --disable-libgcj-debug --enable-thre ads=posix
> --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptio ns
> --enable-hash-synchronization --enable-libstdcxx-debug  
> Thread model: posix
> gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

  It *is* in your path and it *is* found...

 
> D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>make
> gcc -c main.c fusionDefs.h
> make: gcc: Command not found
> make: *** [main.o] Error 127

  And yet when make tries to invoke it, not.

  I can think of two possibilties:

1.  You have some very funny value for SHELL set in your environment
variables,

  or

2.  There's a lot more in your makefile than you actually showed us.



cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help with Make

2008-02-01 Thread Richard Head

>   Ok, show us: cut and paste the actual output from your shell when you run
> the following commands:
> 
> path
> which -a gcc
> gcc -v
> ls -la /bin/gcc
> 
> cheers,
>   DaveK


Here you go (enjoy ;) ):

PATH=C:\MentorGraphics\2005EXP\SDD_HOME\common\win32\bin;C:\MentorGraphics\2005E
XP\SDD_HOME\common\win32\lib;C:\Program Files\CA\Dcs\DMScripting\;C:\Program Fil
es\CA\DCS\CAWIN\;D:\TCL\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\W
bem;C:\Program Files\Common Files\Equisys;C:\Program Files\IDM Computer Solution
s\UltraEdit-32;d:\altera\61\quartus\bin;d:\Program Files\Common Files\GTK\2.0\bi
n;"C:\Program Files\PKWARE\PKZIPC\";C:\EASYWARE\BIN32;C:\Program Files\CA\Unicen
ter Software Delivery\BIN;d:\altera\72\quartus\bin;C:\MENTOR~1\LICENS~1;C:/Mento
rGraphics/2005EXP/MGC_HOME.ixn\bin;C:/MentorGraphics/2005EXP/MGC_HOME.ixn\lib;C:
/MentorGraphics/2005EXP/MGC_HOME.ixn\bin;C:/MentorGraphics/2005EXP/MGC_HOME.ixn\
lib;C:\OrCAD\OrCAD_10.5\tools\bin;C:\OrCAD\OrCAD_10.5\tools\fet\bin;C:\OrCAD\OrC
AD_10.5\tools\Capture;d:\cygwin\bin;C:\Program Files\QuickTime\QTSystem;d:\alter
a\72\quartus\eda\sim_lib\excalibur\swift\lib\pcnt.lib;D:\altera\42\bin;C:\altera
\61\modelsim_ae\win32aloem;D:\cygwin\bin;"C:\Program Files\PKWARE\PKZIPC\"

D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>which -a gcc
/usr/bin/gcc
/usr/bin/gcc

D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>ls -la /bin/gcc
-rwxrwxrwx 1 113007238 mkgroup-l-d 94741 Dec 18  2006 /bin/gcc

D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>path
PATH=C:\MentorGraphics\2005EXP\SDD_HOME\common\win32\bin;C:\MentorGraphics\2005E
XP\SDD_HOME\common\win32\lib;C:\Program Files\CA\Dcs\DMScripting\;C:\Program Fil
es\CA\DCS\CAWIN\;D:\TCL\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\W
bem;C:\Program Files\Common Files\Equisys;C:\Program Files\IDM Computer Solution
s\UltraEdit-32;d:\altera\61\quartus\bin;d:\Program Files\Common Files\GTK\2.0\bi
n;"C:\Program Files\PKWARE\PKZIPC\";C:\EASYWARE\BIN32;C:\Program Files\CA\Unicen
ter Software Delivery\BIN;d:\altera\72\quartus\bin;C:\MENTOR~1\LICENS~1;C:/Mento
rGraphics/2005EXP/MGC_HOME.ixn\bin;C:/MentorGraphics/2005EXP/MGC_HOME.ixn\lib;C:
/MentorGraphics/2005EXP/MGC_HOME.ixn\bin;C:/MentorGraphics/2005EXP/MGC_HOME.ixn\
lib;C:\OrCAD\OrCAD_10.5\tools\bin;C:\OrCAD\OrCAD_10.5\tools\fet\bin;C:\OrCAD\OrC
AD_10.5\tools\Capture;d:\cygwin\bin;C:\Program Files\QuickTime\QTSystem;d:\alter
a\72\quartus\eda\sim_lib\excalibur\swift\lib\pcnt.lib;D:\altera\42\bin;C:\altera
\61\modelsim_ae\win32aloem;D:\cygwin\bin;"C:\Program Files\PKWARE\PKZIPC\"

D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>which -a gcc
/usr/bin/gcc
/usr/bin/gcc

D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --ver
bose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libe
xecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-langu
ages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --
enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-
awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-thre
ads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptio
ns --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>ls -la /bin/gcc
-rwxrwxrwx 1 113007238 mkgroup-l-d 94741 Dec 18  2006 /bin/gcc

D:\Current_Work\Stand Alone Image Fusion\Image Fusion Toolkit>make
gcc -c main.c fusionDefs.h
make: gcc: Command not found
make: *** [main.o] Error 127


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Help with Make

2008-02-01 Thread Dave Korn
On 01 February 2008 13:03, Richard Head wrote:

> How stupid of me.
> Main.c was in the wrong directory *slaps forehead*.

  D'oh!  ~(_8^(|)
 
> As for the gcc command not being found, that wasnt in the path, but now it
> is, and its still not working. Odd. 

  What kind of "not working"?  If it's still saying "Not found", then it's got
to be not in the path after all; if it's some other error message now, tell us
which?

> Maybe Ill just stick with the cywin shell 

  That's generally a good plan anyway, but we may as well try and figure out
what's up with gcc from the dos shell; it ought to work.

cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Using msvcrt.lib from cygwin gcc

2008-02-01 Thread Christopher Faylor
On Fri, Feb 01, 2008 at 01:30:12PM +0100, Alberto Luaces wrote:
>El Friday 01 February 2008 13:04:02 Anik Pal escribi?:
>> What will be the make file syntax to use msvcrt.lib to compile my source
>> code in cygwin gcc?
>
>I think you have to add the flag -mno-cygwin to your compiler command line.

Or maybe, if you don't want to use Cygwin you should consider using MinGW:
http://mingw.org/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Help with Make

2008-02-01 Thread Dave Korn
On 01 February 2008 12:12, Richard Head wrote:

>> Are you running make from Cygwin's shell or from the Windows command line
>> shell instead?
> 
> Windows Command Line.
> 
> Ive just tried it in the Cygwin shell and I get the same first error. The
> 2nd has gone away (It can find gcc now!)

  So, that means the cygwin bin dir isn't in your windows PATH setting.

  As to the first error, can you confirm that main.c and the makefile are
actually in the same directory, and that you're cd'ing into that directory
(rather than e.g. using syntax like "make -f ./path/to/Makefile").


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Using msvcrt.lib from cygwin gcc

2008-02-01 Thread Alberto Luaces
El Friday 01 February 2008 13:04:02 Anik Pal escribió:
> What will be the make file syntax to use msvcrt.lib to compile my source
> code in cygwin gcc?

I think you have to add the flag -mno-cygwin to your compiler command line.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help with Make

2008-02-01 Thread Richard Head

>   What kind of "not working"?  If it's still saying "Not found", then it's got
> to be not in the path after all; if it's some other error message now, tell us
> which?
> 

Still saying gcc: command not found, and d:\cygwin\bin is def in the path.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Help with Make

2008-02-01 Thread Dave Korn
On 01 February 2008 13:42, Richard Head wrote:

>>   What kind of "not working"?  If it's still saying "Not found", then it's
>> got to be not in the path after all; if it's some other error message now,
>> tell us which? 
>> 
> 
> Still saying gcc: command not found, and d:\cygwin\bin is def in the path.

  Ok, show us: cut and paste the actual output from your shell when you run
the following commands:

path
which -a gcc
gcc -v
ls -la /bin/gcc


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Help with Make

2008-02-01 Thread Christopher Faylor
On Fri, Feb 01, 2008 at 01:41:48PM +, Richard Head wrote:
>>   What kind of "not working"?  If it's still saying "Not found", then it's 
>> got
>> to be not in the path after all; if it's some other error message now, tell 
>> us
>> which?
>
>Still saying gcc: command not found, and d:\cygwin\bin is def in the path.

There isn't any mystery to how this works.  If you really have d:\cygwin\bin
in your path and gcc is really in d:\cygwin\bin then any application, whether
cygwin-based or not, will find gcc.

In Windows your path should look something like:

d:\cygwin\bin;c:\windows\system;...
 ^ ^
   semicolons

We've reached the point where you need to provide the details mentioned at
http://cygwin.com/problems.html.  The cygcheck output, in particular would
probably show what the problem is but you should run the cygcheck command
from outside of a cygwin shell.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Linker Errors?

2008-02-01 Thread Dave Korn
On 01 February 2008 16:22, Richard Head wrote:

> I get the following output when I try and link 3 object files to form my
> exe. 
> 
> gcc main.o fusionFileIO.o fusionAlgorithms.o -o fusionTK.exe
> fusionFileIO.o:fusionFileIO.c:(.rdata+0x0): multiple definition of
> `_BAD_IMAGE' main.o:main.c:(.rdata+0x0): first defined here
> collect2: ld returned 1 exit status
> make: *** [fusionTK.exe] Error 1
> 
> "BAD_IMAGE" is a constant declared in a header file used in all 3 of the
> object files.
> 
> Where am I going wrong?

  You need to refresh your memory on the difference between a declaration and
a definition.  


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Linker Errors?

2008-02-01 Thread Richard Head
I get the following output when I try and link 3 object files to form my exe.

gcc main.o fusionFileIO.o fusionAlgorithms.o -o fusionTK.exe
fusionFileIO.o:fusionFileIO.c:(.rdata+0x0): multiple definition of `_BAD_IMAGE'
main.o:main.c:(.rdata+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [fusionTK.exe] Error 1

"BAD_IMAGE" is a constant declared in a header file used in all 3 of the object
files. 

Where am I going wrong? 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: OPENSSH passwordless login getting "system error 59" on "net use" cmd with samba

2008-02-01 Thread Terry Orechia

Hi,

I was able to resolve this issue by switching the user who runs the sshd 
service.  If anyone else is having this problem you can find detailed 
documentation on how to do get around this issue this at 
http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html.


Thanks,
Terry

- Original Message - 
From: "Terry Orechia" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, January 31, 2008 3:04 PM
Subject: OPENSSH passwordless login getting "system error 59" on "net use" 
cmd with samba




Hi,

  I am getting "system error 59" when I run "net use z:server\\share 
/user:user1 " to access a samb shared drive in an openssh 
windows session where I use passwordless login with command "ssh -i 
 user1@ " to login to the windows desktop running 
sshd.  I have been searching the mailing lists, but have not found any 
information on this specific issue.


  I am trying to run a batch script from a unix server to execute some 
commands on the windows desktop that need to access a shared drive.  I 
installed and configured samba3 on the unix server where the shared files 
are located.  I have installed and configured the most recent download of 
cygwin with the openssh option on the windows desktop.  Logged in as user1 
on the windows destktop, I can run the dos console or the cygwin shell and 
successfully map network drives usin the "net use" command above.   I am 
also successfully able to run the "net use" command on the windows client 
when I login using openssh as user1 and get prompted for the password 
(using command "ssh user1@").  Therefore I know that I have 
correctly setup samba, cygwin and openssh for user1 to access the shared 
drive.  I then created keys using ssh-keygen for passwordless login for 
user1 on the desktop.   When I login to the desktop using openssh 
passwordless login for user1 with command "ssh -i  
[EMAIL PROTECTED]",  I get "system error 59" when I run the same "net use" 
command above.  I cannot have any user prompts for the passwords in my 
script.  Does anyone know if is possible to use passwordless login from 
openssh and then map a network drive using samba to access the shared 
drive in the ssh session?If so, any ideas on why this is not working. 
If this will not work, does anyone know if this will work with SFU ( in 
place of samba) or any other software for sharing the drives?


Thanks for you help in this issue,
Terry







--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: OPENSSH passwordless login getting "system error 59" on "net use" cmd with samba

2008-02-01 Thread Larry Hall (Cygwin)

Terry Orechia wrote:

Hi,

I was able to resolve this issue by switching the user who runs the sshd 
service.  If anyone else is having this problem you can find detailed 
documentation on how to do get around this issue this at 
http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html.




Some words of caution here:

The procedure outlined with the domain user as the user the service will
run as gives the domain user advanced privileges which encompass those
of SYSTEM (on http://cygwin.com/faq/faq-nochunks.html#faq.using.shares> for more
details.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: OPENSSH passwordless login getting "system error 59" on "net use" cmd with samba

2008-02-01 Thread Terry Orechia

 You should still be able to login as yourself and gain access to
your network shares.


I am able to login as myself without passwordless login and get access to my 
network shares.  However, I am not able to login as myself using 
PASSWORDLESS login via public keys and have access to the network shares.  I 
need to execute ssh login in a batch script so I need  passwordless login to 
work and I need to have access to the network shares when I login.Is 
there some other way to get access to network shares via passwordless login 
without changing the user who runs the sshd service and opening the security 
hole?


Thanks for your input,
Terry

- Original Message - 
From: "Larry Hall (Cygwin)" <[EMAIL PROTECTED]>

To: 
Sent: Friday, February 01, 2008 1:33 PM
Subject: Re: OPENSSH passwordless login getting "system error 59" on "net 
use" cmd with samba




Terry Orechia wrote:

Hi,

I was able to resolve this issue by switching the user who runs the sshd 
service.  If anyone else is having this problem you can find detailed 
documentation on how to do get around this issue this at 
http://ist.uwaterloo.ca/~kscully/CygwinSSHD_W2K3.html.




Some words of caution here:

The procedure outlined with the domain user as the user the service will
run as gives the domain user advanced privileges which encompass those
of SYSTEM (on hole but others trying to log in will run in your user context in your 
case.

See  for more
details.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Section 508 Compliance

2008-02-01 Thread Andrew Schulman
> Can you please let us know if the latest version of Cygwin is compliant
> with Section 508 of the Rehabilitation Act?

Of what country?

> If possible, please provide
> us a completed Voluntary Product Accessibility Template (VPAT).

If possible, please provide us ample payment.

> Confidentiality Notice: This communication and any attachments may
> contain information that is proprietary to SAIC and/or its customers.

Clue Notice:  you have posted your possibly confidential information to a public
mailing list.


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Section 508 Compliance

2008-02-01 Thread Heaney, Robin G
I checked the FAQ and did numerous searches both on your website and
Google, but could not find any mention of Cygwin being section 508
compliant.  

Can you please let us know if the latest version of Cygwin is compliant
with Section 508 of the Rehabilitation Act?  If possible, please provide
us a completed Voluntary Product Accessibility Template (VPAT).


Regards,
Robin Heaney
SAIC, NBIS CM Specialist
865-481-2810

Confidentiality Notice: This communication and any attachments may
contain information that is proprietary to SAIC and/or its customers. It
may be used by the intended recipient only for the purpose for which it
was transmitted. If you received this message in error, please return it
to the sender and delete this copy from your system.

 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: OPENSSH passwordless login getting "system error 59" on "net use" cmd with samba

2008-02-01 Thread Larry Hall (Cygwin)

On 02/01/2008, Terry Orechia wrote:

>  You should still be able to login as yourself and gain access to
> your network shares.

I am able to login as myself without passwordless login and get access to 
my network shares.  However, I am not able to login as myself using 
PASSWORDLESS login via public keys and have access to the network shares.  
I need to execute ssh login in a batch script so I need  passwordless login 
to work and I need to have access to the network shares when I login.Is 
there some other way to get access to network shares via passwordless login 
without changing the user who runs the sshd service and opening the 
security hole?



Yes, it should be possible to change the user as you have without adding the
extra permissions to that user.  This is what I was suggesting (and the FAQ
I pointed to mentions as an option).

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Section 508 Compliance

2008-02-01 Thread Mr Webber


Let me start by declaring that I am not a lawyer; But:

If the following is correct, CYGWIN does not qualify as an application nor
is it an operating system and would (should) not be subject to Section 508.

Cygwin is an environment emulator.

--
Summary of Section 508 technical standards

Software Applications and Operating Systems: includes usability for people
that are visually impaired, such as alternative keyboard navigation. 
Web-based Intranet and Internet Information and Applications: assures
accessibility to web page graphics by the visually impaired using assistive
technology such as screen readers and refreshable Braille displays. This is
accomplished by using text labels and descriptors for graphics. 
Telecommunications Products: addresses accessibility for people who are deaf
or hard of hearing. This includes technology compatibility with hearing
aids, assistive listening devices, and TTYs. 

Videos or Multimedia Products: includes requirements for captioning of
multimedia products such as training or informational multimedia
productions. Captioning or video descriptors must be able to be turned on or
off. 

Self Contained, Closed Products: products with embedded software, such as
information kiosks, copiers, and fax machines, often cannot be used with
assistive technology. This standard requires that access features be built
into these systems. 
Desktop and Portable Computers: discusses accessibility related to
mechanically operated controls such as keyboards and touch screens.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Heaney, Robin G
Sent: Friday, February 01, 2008 2:09 PM
To: cygwin@cygwin.com
Cc: Heaney, Robin G; Carrington-Duckett, Laura B.
Subject: Section 508 Compliance

I checked the FAQ and did numerous searches both on your website and
Google, but could not find any mention of Cygwin being section 508
compliant.  

Can you please let us know if the latest version of Cygwin is compliant
with Section 508 of the Rehabilitation Act?  If possible, please provide
us a completed Voluntary Product Accessibility Template (VPAT).


Regards,
Robin Heaney
SAIC, NBIS CM Specialist
865-481-2810

Confidentiality Notice: This communication and any attachments may
contain information that is proprietary to SAIC and/or its customers. It
may be used by the intended recipient only for the purpose for which it
was transmitted. If you received this message in error, please return it
to the sender and delete this copy from your system.

 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: root and chown

2008-02-01 Thread Brian Dessent
"Robert W. Kuhn" wrote:

> On my windows computer:
> 
>  [EMAIL PROTECTED]:grep root /etc/passwd
>  root::0:0:root:/root:/bin/bash
>  operator:*:12:0:operator:/root:
> 
>  [EMAIL PROTECTED]:chown root sshd/
>  chown: changing ownership of `sshd': Invalid argument

'root' works differently in Windows than unix.  It is a group (an alias
to the Administrators group), not a user, because in the Windows
security model ownership can be by either.  And it has a special SID as
it is a well-known group.  Thus you shouldn't have any root entry in
your passwd, and you should have a root entry in your /etc/group that
has the SID of S-1-5-32-544.  This is all automatically done for you
when you run mkgroup and mkpasswd, so there should not be any need to
touch this.

> The original proble is that I want to start the ssd-server on the client
> but:
> 
>  [EMAIL PROTECTED]:/var/empty# /etc/init.d/ssh start
>  Starting OpenBSD Secure Shell server: sshd/var/empty/sshd must be owned
>  by root and not group or world-writable.
>   failed (255: ).

Okay, stop there.  To install sshd you simply run "ssh-host-config" and
it will set everything up with the appropriate privileges and
ownerships.  Note that this installs ssh as a service, not through
init.d.  This is the preferred way to run daemons on Windows, because
they automatically start at bootup with user intervention.  Thus you
should get used to starting and stopping the sshd daemon with cygrunsrv
-S/-E, not through any script.

Brian

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Section 508 Compliance

2008-02-01 Thread Mr Webber
Cygwin uses windows display libraries.  So, it would seem that Windows
usability or accessibility tools might work on the Cygwin Console or an
X-Cygwin window.

Have you tried any of them? I just tried the Magnifier and it works just
fine.

-Original Message-
From: Heaney, Robin G [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 01, 2008 2:44 PM
To: Mr Webber
Cc: Carrington-Duckett, Laura B.
Subject: RE: Section 508 Compliance

Thank you for your email.  Can you let me know if Cygwin has any
user-interface that could be affected?

Thanks,
Robin Heaney
SAIC

-Original Message-
From: Mr Webber [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 01, 2008 2:40 PM
To: Heaney, Robin G; cygwin@cygwin.com
Cc: Carrington-Duckett, Laura B.
Subject: RE: Section 508 Compliance



Let me start by declaring that I am not a lawyer; But:

If the following is correct, CYGWIN does not qualify as an application
nor
is it an operating system and would (should) not be subject to Section
508.

Cygwin is an environment emulator.

--
Summary of Section 508 technical standards

Software Applications and Operating Systems: includes usability for
people
that are visually impaired, such as alternative keyboard navigation. 
Web-based Intranet and Internet Information and Applications: assures
accessibility to web page graphics by the visually impaired using
assistive
technology such as screen readers and refreshable Braille displays. This
is
accomplished by using text labels and descriptors for graphics. 
Telecommunications Products: addresses accessibility for people who are
deaf
or hard of hearing. This includes technology compatibility with hearing
aids, assistive listening devices, and TTYs. 

Videos or Multimedia Products: includes requirements for captioning of
multimedia products such as training or informational multimedia
productions. Captioning or video descriptors must be able to be turned
on or
off. 

Self Contained, Closed Products: products with embedded software, such
as
information kiosks, copiers, and fax machines, often cannot be used with
assistive technology. This standard requires that access features be
built
into these systems. 
Desktop and Portable Computers: discusses accessibility related to
mechanically operated controls such as keyboards and touch screens.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of
Heaney, Robin G
Sent: Friday, February 01, 2008 2:09 PM
To: cygwin@cygwin.com
Cc: Heaney, Robin G; Carrington-Duckett, Laura B.
Subject: Section 508 Compliance

I checked the FAQ and did numerous searches both on your website and
Google, but could not find any mention of Cygwin being section 508
compliant.  

Can you please let us know if the latest version of Cygwin is compliant
with Section 508 of the Rehabilitation Act?  If possible, please provide
us a completed Voluntary Product Accessibility Template (VPAT).


Regards,
Robin Heaney
SAIC, NBIS CM Specialist
865-481-2810

Confidentiality Notice: This communication and any attachments may
contain information that is proprietary to SAIC and/or its customers. It
may be used by the intended recipient only for the purpose for which it
was transmitted. If you received this message in error, please return it
to the sender and delete this copy from your system.

 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Problem compiling MPI examples under cygwin

2008-02-01 Thread madfran
Hi,...

I have a probleme when I try to compile under cygwin.
The program it an example from MPICH2.
Following the advice of the people from MPICH2, I install MPICH2 under
WinXP, change the PATH to add the new addres and,... nothing, cygwin is
not able to find the include.

Attached the test done.


madfran

**
*
[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ ls -l /cygdrive/c/"Program Files"/MPICH2/include/mpi.h
-rwxrwxrwx+ 1 madfran root 51473 Oct 30 16:05 /cygdrive/c/Program 
Files/MPICH2/include/mpi.h

[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ make clean

[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ make hellow
gcc  -I../src/include -I../src/include -O2  -c hellow.c
hellow.c:13:17: mpi.h: No such file or directory
hellow.c: In function `main':
hellow.c:21: error: `MPI_COMM_WORLD' undeclared (first use in this function)
hellow.c:21: error: (Each undeclared identifier is reported only once
hellow.c:21: error: for each function it appears in.)
make: *** [hellow.o] Error 1

[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ which mpi.h
/cygdrive/c/Program files/MPICH2/include/mpi.h

[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/cygwin/lib:/cygdrive/c
/P
rogram files/MPICH2/lib:/cygdrive/c/Program 
files/MPICH2/include:C:/Perl/bin/:/c
ygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:/cy
gd
rive/c/Program Files/HPQ/IAM/bin:/cygdrive/c/Program Files/Common 
Files/Autodesk
 Shared/:/cygdrive/c/program files/IXOS/IXOS-eCONtext/bin:/cygdrive/c/program 
fi
les/IXOS/IXOS-
eCONtext/opt/ORA/bin:/cygdrive/c/Oracle/ora8iclient/bin:/cygdrive/
c/Program 
Files/Oracle/jre/1.1.7/bin:/cygdrive/c/Oracle/ora81/bin:/cygdrive/c/pg
p:/cygdrive/c/Program Files/Common Files/AspenTech 
Shared/:/cygdrive/c/Program F
iles/Nmap:/cygdrive/c/Program files/MPICH2/bin:/cygdrive/c/PGP:/usr/bin

[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ ls -l /cygdrive/c/"Program Files"/MPICH2/include/mpi.h
-rwxrwxrwx+ 1 madfran root 51473 Oct 30 16:05 /cygdrive/c/Program 
Files/MPICH2/include/mpi.h

[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
**

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Problem compiling MPI examples under cygwin

2008-02-01 Thread Larry Hall (Cygwin)

madfran wrote:

Hi,...

I have a probleme when I try to compile under cygwin.
The program it an example from MPICH2.
Following the advice of the people from MPICH2, I install MPICH2 under
WinXP, change the PATH to add the new addres and,... nothing, cygwin is
not able to find the include.





[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ ls -l /cygdrive/c/"Program Files"/MPICH2/include/mpi.h
-rwxrwxrwx+ 1 madfran root 51473 Oct 30 16:05 /cygdrive/c/Program 
Files/MPICH2/include/mpi.h


[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ make clean

[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
$ make hellow
gcc  -I../src/include -I../src/include -O2  -c hellow.c
hellow.c:13:17: mpi.h: No such file or directory
hellow.c: In function `main':
hellow.c:21: error: `MPI_COMM_WORLD' undeclared (first use in this function)
hellow.c:21: error: (Each undeclared identifier is reported only once
hellow.c:21: error: for each function it appears in.)
make: *** [hellow.o] Error 1



You didn't tell it where the file was.  Try adding
'-I "/cygdrive/c/Program iles/MPICH2/include/mpi.h"' to your list of include
paths.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Problem compiling MPI examples under cygwin

2008-02-01 Thread Matt Wozniski
On Feb 1, 2008 4:43 PM, madfran wrote:
> Hi,...
>
> I have a probleme when I try to compile under cygwin.
> The program it an example from MPICH2.
> Following the advice of the people from MPICH2, I install MPICH2 under
> WinXP, change the PATH to add the new addres and,... nothing, cygwin is
> not able to find the include.

Err... I wouldn't expect that to work on any POSIX platform.  gcc
searches for includes in directories specified by -I on its command
line, not based on $PATH...

> [EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
> $ make hellow
> gcc  -I../src/include -I../src/include -O2  -c hellow.c
> hellow.c:13:17: mpi.h: No such file or directory
> hellow.c: In function `main':
> hellow.c:21: error: `MPI_COMM_WORLD' undeclared (first use in this function)
> hellow.c:21: error: (Each undeclared identifier is reported only once
> hellow.c:21: error: for each function it appears in.)
> make: *** [hellow.o] Error 1

See, it's searching in "../src/include", in addition to the default
compiler directories.  If the Makefile is 'standard', you could
probably do:
make CFLAGS='-I /cygdrive/c/Program\ files/MPICH2/include' hellow
to convince it to search in the MPICH2 include dir as well.
(you may or may not need the \ before the space in program files,
depending on how make does its argument splitting, I'm not really
sure)

But anyway, this isn't really on-topic here, since this is just a
general "How to compile in a POSIX environment" question.

~Matt

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Problem compiling MPI examples under cygwin

2008-02-01 Thread madfran
Sorry, but the problem it is not so easy to solve.

If you read carrefully my original post, you realize that:

>[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
>$ which mpi.h /cygdrive/c/Program files/MPICH2/include/mpi.h

That means which is able to find mpi.h

>[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
>$ echo 
$PATH//usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/cygwin/lib:/cygd
rive/c/Program files/MPICH2/lib:/cygdrive/c/Program files/MPICH2/include:.

That means the PATH is correct.

>[EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
>$ ls -l /cygdrive/c/"Program Files"/MPICH2/include/mpi.h -rwxrwxrwx+ 1 
madfran root 51473 Oct 30 16:05 /cygdrive/c/Program Files/MPICH2/include/mpi.h

That means I have rights over mpi.h

madfran


On Fri, 01 Feb 2008 16:52:57 -0500, Larry Hall (Cygwin) wrote
> madfran wrote:
> > Hi,...
> > 
> > I have a probleme when I try to compile under cygwin.
> > The program it an example from MPICH2.
> > Following the advice of the people from MPICH2, I install MPICH2 under
> > WinXP, change the PATH to add the new addres and,... nothing, cygwin is
> > not able to find the include.
> 
> 
> 
> > [EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
> > $ ls -l /cygdrive/c/"Program Files"/MPICH2/include/mpi.h
> > -rwxrwxrwx+ 1 madfran root 51473 Oct 30 16:05 /cygdrive/c/Program 
> > Files/MPICH2/include/mpi.h
> > 
> > [EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
> > $ make clean
> > 
> > [EMAIL PROTECTED] /cygdrive/c/cygwin/tmp/mpi/mpich2-1.0.6p1/examples
> > $ make hellow
> > gcc  -I../src/include -I../src/include -O2  -c hellow.c
> > hellow.c:13:17: mpi.h: No such file or directory
> > hellow.c: In function `main':
> > hellow.c:21: error: `MPI_COMM_WORLD' undeclared (first use in this 
function)
> > hellow.c:21: error: (Each undeclared identifier is reported only once
> > hellow.c:21: error: for each function it appears in.)
> > make: *** [hellow.o] Error 1
> 
> You didn't tell it where the file was.  Try adding
> '-I "/cygdrive/c/Program iles/MPICH2/include/mpi.h"' to your list of 
> include paths.
> 
> -- 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: HowTo setup cygwin + sshd using hosts.allow and hosts.deny and use detailed logging

2008-02-01 Thread Martin
Hello Rene!

SOLVED!

Thanks again for your input.
Without you it would not be possible to solve my problem.

The Solution for running denyhosts under Cygwin as a Service including your
wonderful cmd:
cygrunsrv -I DenyHosts -p /usr/share/denyhosts/daemon-control -a start -d
DenyHosts -f "DenyHosts 2.6" -y sshd -x /var/run/denyhosts.pid -o

To set the owner to SYSTEM:Administrators for the denyhosts directory

Like this:
In the dir /usr/share
chown -R SYSTEM:Administrators denyhosts

This is needed because if you run the service denyhosts under the SYSTEM
Account it will start as the User SYSTEM but this user is not allowed to run
denyhosts

I found out this by poking around with User rights and User owner.
A good trick is to install it in the rc.local, install init as System
service and then redirect the output to a file.
By magic the file has also the owner SYSTEM:Administrators

Thanks again for being patient with me.

Regards
Martin


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: HowTo setup cygwin + sshd using hosts.allow and hosts.deny and use detailed logging

2008-02-01 Thread René Berber

Martin wrote:


SOLVED!

Thanks again for your input.
Without you it would not be possible to solve my problem.

The Solution for running denyhosts under Cygwin as a Service including your
wonderful cmd:
cygrunsrv -I DenyHosts -p /usr/share/denyhosts/daemon-control -a start -d
DenyHosts -f "DenyHosts 2.6" -y sshd -x /var/run/denyhosts.pid -o

To set the owner to SYSTEM:Administrators for the denyhosts directory


Not really, the only directory that needs a change in permissions is 
denyhosts/data, sorry I forgot I had made that change... probably found 
out just like you, by looking at logs.



Like this:
In the dir /usr/share
chown -R SYSTEM:Administrators denyhosts

This is needed because if you run the service denyhosts under the SYSTEM
Account it will start as the User SYSTEM but this user is not allowed to run
denyhosts


To run or to access it's work files?  I'm sure it's the later (since 
that's the way I have it).



I found out this by poking around with User rights and User owner.
A good trick is to install it in the rc.local, install init as System
service and then redirect the output to a file.
By magic the file has also the owner SYSTEM:Administrators

Thanks again for being patient with me.


Glad I could help.
--
René Berber


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



CIFS symlinks on network share break Cygwin

2008-02-01 Thread Jonathan Lanier
OK, so, to resurrect this issue from... oh, about 1.5 years ago (see my
post on Oct 22 2006)...  :P

Sorry for not getting back with more on this earlier, but I have been
busy.  Since it was going to be difficult to track down I ended up
reverting to the older, working Cygwin.

To quickly (re)summarize the problem:

Newer versions of Cygwin appear to be incompatible with Windows network
shares on CIFS servers.  This incompatibility arises due to the fact
that the Windows OS seems to return unexpected values for file/directory
information if the file/directory is a native symlink on the CIFS
server, which confuses Cygwin.  By native, I mean that it is a true
symlink, created from a *nix client accessing the same network share;
our CIFS server, a NetApp box, supports true symlinks.  Example: The
native Windows API function GetFileAttributesEx() returns an attribute
of 0x80 instead of 0x10 when looking up the attribute for a directory
that is a native symlink (i.e. it incorrectly thinks it's a file, not a
directory), but *only* when called from a Cygwin application.  Compiling
the same app with -mno-cygwin, or MSVC, returns 0x10 correctly as
expected.  This incorrect behavior makes it impossible to cd to the
directory; Cygwin just reports an error and refuses to change the
current directory.  File symlinks have similar problems due to the fact
that the size reported is the size of the symlink, not the size of the
file, of a symlink that points to a file.  To add to my frustration, I
found that an older version of Cygwin (1.5.14-1) worked perfectly with
no problems.

Now I'll add some new information.  All versions of Cygwin up to
1.5.19-4 work perfectly with CIFS servers.  All versions of Cygwin after
1.5.20-1, including the current (1.5.25-7 AFAIK), fail to work correctly
with CIFS servers.  I used the Cygwin time machine (as suggested by
Matthew Woehlke, awesome find - never knew about that, very helpful,
thanks!) to determine this.  I got the source for the latest
cygwin1.dll, rebuilt, and started debugging...

What I found was amazing and somewhat confusing.  I know what's breaking
it, and I'd like some assistance figuring out what to do to fix it
correctly, in the interests of getting Cygwin working again for all us
CIFS users.

I'm certain the problem lies in the Windows OS; basically, as I
originally suspected, Windows is doing something evil.  If you look at
the function set_cygwin_privileges() in winsup9/cygwin/sec_helper.cc
you'll see the following:

void
set_cygwin_privileges (HANDLE token)
{
  set_privilege (token, SE_RESTORE_PRIV, true);
  set_privilege (token, SE_BACKUP_PRIV, true);
  set_privilege (token, SE_CHANGE_NOTIFY_PRIV, !allow_traverse);
}

Now, one of these lines didn't exist pre-1.5.20-1.  That is the line
that sets SE_BACKUP_PRIV to true.  This is easily verified by looking at
the source for 1.5.19-4; that version only had 2 lines:

void
set_cygwin_privileges (HANDLE token)
{
  set_privilege (token, SE_RESTORE_PRIV, true);
  set_privilege (token, SE_CHANGE_NOTIFY_PRIV, !allow_traverse);
}

What I believe is happening is this.  Windows XP normally hides advanced
non-Windows attributes from a Windows app.  Since Windows XP doesn't
"know" about Unix-style symlinks (let's ignore reparse points, etc. for
the moment), normally an SMB/CIFS client simply returns the information
about the file or directory at the end of the link traversal.  This is
the expected behavior; a directory should be treated as a directory with
a size of 0, a file should be treated as a file with it's true size,
etc.  Now, when you set the SE_BACKUP_PRIV, Windows XP wants the process
to be in "backup" mode.  So, it wants it to see information about the
actual link, not about the item linked to.  So, directories that are
symlinks are NOT reported as directories; their size is the size of the
symlink file on the server, NOT 0; files only return the size of the
symlink, NOT the true file size, etc.  This is *exactly* what I see when
I try to run Cygwin on a CIFS share running on our NetApp box.  This
"magic" behavior is probably intended for use internally by MS backup
apps, or possibly for more advanced SFU (Services for Unix)
compatibility.  I don't know *why* they are doing this, only that they
*are*, and it totally hoses Cygwin.  As far as I can tell from the MS
knowledge base, this "extra" feature enabled when setting SE_BACKUP_NAME
is completely undocumented.

If I comment out the line that sets SE_BACKUP_PRIV to true, everything
works perfectly.

My questions:
* Is this a valid fix?
* What are the repercussions of removing the SE_BACKUP_PRIV line?
* Why was it added in 1.5.20-1 in the first place; i.e. do we really
want/need all Cygwin processes having backup privilege?

I'm really surprised that more people haven't complained about this,
because Cygwin is totally broken on CIFS network shares and has been for
some time.  I'm guessing most people are running Samba rather than a
full-featured CIFS implementation s