File losing ownership

2005-03-09 Thread Colin JN Breame
I have a file such that:

$ ls -l test
-rw-r--r--  1 Administrators None 6 Mar  9 17:00 test

I open it and save in emacs.

$ ls -l test
-rw-r--r--  1 colin None 7 Mar  9 17:00 test


Is this a bug?


 -- Colin

--
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/



apt-rpm port

2005-03-09 Thread Colin JN Breame
AFAIK, rpm has been ported for a long time.

Has anyone looked into porting Conectiva's apt-rpm?

 -- Colin

--
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/



Listing services

2005-03-04 Thread Colin JN Breame
Hello,

Anyone know how to list the names and descriptions of all the services on the 
system?

Cheers,

--
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/



sshd error log and sshd_config

2005-02-28 Thread Colin JN Breame
Hi,

I've been having a few problems with sshd on win2k3.

I'm not using privilege separation and it's running as the local system 
account (as I don't need key authentication).  It runs but doesn't appear to 
listen.

So, I decided to check to see what the log files said.  I install sshd with 
the following:

$ cygrunsrv -I sshd -d CYGWIN sshd -p /usr/sbin/sshd -a -e -D -e 
CYGWIN=ntsec tty --stdout /var/log/sshd.out.log 
--stderr /var/log/sshd.err.log

I've added the -e argument for sshd, although this may not be necessary.

So, I would expect to see something (anything!) after starting in either 
sshd.out.log or sshd.err.log.  However, they are empty.

Adding 'LogLevel VERBOSE' has no effect.

Infact, I can add complete garbage to sshd_config and sshd continues to start 
asif nothing had happend.  And not work.

Any help would be appreciated.

 -- Colin JN Breame

--
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/



What is aux???!

2004-10-29 Thread Colin JN Breame
Try this:
$ mkdir aux
mkdir: `aux' exists but is not a directory
$ cat aux
(hangs)
$ ./aux
(hangs)
$ ls aux
aux
$ rm aux
$
Yours bemused,
-- Colin
--
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: What is aux???!

2004-10-29 Thread Colin JN Breame
Larry Hall wrote:
At 10:43 AM 10/29/2004, you wrote:
 

Try this:
$ mkdir aux
mkdir: `aux' exists but is not a directory
$ cat aux
(hangs)
$ ./aux
(hangs)
$ ls aux
aux
$ rm aux
$
Yours bemused,
-- Colin
   


Welcome to Windows.  

You should try googling for things like this.  It has come up before not 
surprisingly:

http://www.cygwin.com/ml/cygwin/2004-02/msg00370.html
 

Says here http://www.cygwin.com/ml/cygwin/2004-02/msg00373.html that:
Starting with version 1.5.0, Cygwin provides a special managed mount 
mode that encodes, among other things, special names (including aux) 
so that they can be used in Cygwin.

Is this something I can activate ??
-- Colin

--
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: What is aux???!

2004-10-29 Thread Colin JN Breame
Christopher Faylor wrote:
On Fri, Oct 29, 2004 at 03:52:35PM -0400, Igor Pechtchanski wrote:
 

On Fri, 29 Oct 2004, Colin JN Breame wrote:
   

Try this:
$ mkdir aux
mkdir: `aux' exists but is not a directory
$ cat aux
(hangs)
$ ./aux
 

^^^
Given the subject, I especially like this one... :-)
   

It seems like this aux has gored a number of people on the cygwin
list over the years...
cgf
 

This doesn't seem to work either:
$ gcc aux
:D
-- Colin

--
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: Filename limits

2004-10-28 Thread Colin JN Breame
Shankar Unni wrote:
The Unicode versions of several functions permit a maximum path length 
of 32,767 characters, composed of components up to 255 characters in 
length. To specify such a path, use the \\?\ prefix. For example, 
\\?\D:\path. To specify such a UNC path, use the \\?\UNC\ 
prefix. For example, \\?\UNC\server\share. Note that these 
prefixes are not used as part of the path itself. They indicate that 
the path should be passed to the system with minimal modification. An 
implication of this is that you cannot use forward slashes to 
represent path separators or a period to represent the current directory.

If I have understood the documentation correctly, using the Unicode 
version of file functions (e.g. CreateFileW) and prepending \\?\ allows 
32k character path limit.

It would be possible to change all instances of CreateFile, MoveFile, 
DeleteFile, etc. to CreateFileW, MoveFileW, etc. and create a function 
that converted the win32 path into a unicode version (possibly something 
like path_conv.get_nt_native_path()).

The one drawback I can see is with compatibility:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createfile.asp 
wrote:

*Windows Me/98/95:  **CreateFileW* is supported by the Microsoft Layer 
for Unicode. To use this, you must add certain files to your 
application, as outlined in Microsoft Layer for Unicode on 
Windows 95/98/Me Systems 
http://msdn.microsoft.com/library/en-us/mslu/winprog/microsoft_layer_for_unicode_on_windows_95_98_me_systems.asp.
The best solution would to select either CreateFileA or CreateFileW at 
runtime, depending upon the system it is being run on.  However, what 
would happen if CreateFileW was linked (but not called) on a non-Unicode 
enabled win 95/98/Me system?

I noticed in fhandler.cc there is a reference to NtCreateFile, which 
according to msdn, is XP and 2000 only.  What happens on a win95 machine?

This would be a /real benefit/ if cygwin supported longer path names.
-- Colin

--
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/


Status of nl_langinfo and CODESET

2004-10-27 Thread Colin JN Breame
I've been investigating the dreaded Can't recode string error in 
subversion.  This error occurs when a string contains characters that 
cannot be converted into the equivalent characters in the users locale.

It seems that nl_langinfo always returns US-ASCII (at least on my 
system), even if LC_CTYPE is set or the locale is something else entirely.

Looking at the archive indicates that cygwin doesn't have proper 
locale support.  Does anyone know what would be required to give cygwin 
proper locale support?

Colin
--
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/


Filename limits

2004-10-27 Thread Colin JN Breame
As I understand, relative paths in windows suffer from a 255 character 
limit (or something like that).  However, I have heard rumour that 
absolute paths in windows are limited to 32k characters.

Would it not solve the problem of  the File name too long errors if 
paths were first converted to their absolute form?

Colin
--
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/


windows specific code

2004-10-27 Thread Colin JN Breame
Where does the windows specific code live for libc?
e.g.
newlib/libc/stdio/fopen.c:  fopen calls _open_r
newlib/libc/reent/openr.c:  _open_r calls _open
where does _open live?
Colin
--
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: filesystem encoding

2004-09-09 Thread Colin JN Breame
Arturus Magi wrote:
Windows Explorer is Unicode 3.0 compliant on the NT line (I have 
several files that use a mixture of English, Japanese, and Chinese in 
the filename and various description fields), and the 9x line can be 
made partially Unicode-aware.  I don't think the em hyphen is a valid 
character on any Windows or ISO codepage (other than the Unicode 
project mirror standard (I want to say it's ISO-11350, but I'm fairly 
certain that's not right)).
Hmm...interesting.  Not entirely sure what the implications of what you 
are saying are (as I don't really understand codepages).

Does a codepage represent a character with 16 bits? or 8?  Could you 
recommend a book or a URL on the subject?  Maybe I should look at this 
when I have more time (I'm in the middle of a move).

Thanks
--
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/


filesystem encoding

2004-09-08 Thread Colin JN Breame
Hello,
Could anyone direct me to some documentation about how cygwin decodes 
filenames (e.g. with ls)

Thanks
ps. cygwin is cool
--
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: filesystem encoding

2004-09-08 Thread Colin JN Breame
Igor Pechtchanski wrote:
Any names that can't be so mapped are rejected as
invalid, and are displayed with '?'s by ls.  Switching to the correct
language allows accessing those names.  

HmmmI have a file that, through windows explorer contains a (long) 
hypen, but through cywin (ls), the character comes out as a ?.

Any ideas?
--
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/


setup

2004-09-07 Thread Colin JN Breame
Is there a way of installing packages on 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/


Locking down cygwin for security

2004-09-03 Thread Colin JN Breame
Hello,
Is it possible to disabled certain features to make cygwin secure over 
ssh such that the logged in user cannot:

- cd into any /cygdrive drives
- mount any local or UNC drives
but still:
- access a system wide mount to a local drive
???
Thanks,
Colin
--
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: Why umount -A is a really bad idea

2004-09-02 Thread Colin JN Breame
Christopher Faylor wrote:
I have had a modification to mount waiting in the wings for a while now
which foregos the use of the registry entirely but I can't convince
myself that, if I implement it, the mailing list won't be filled with
the moans of people who now have to do a mount -a -t ntfs (or
whatever) every time they reboot.
 

Any chance I can get a copy of this patch?
I was thinking about maybe porting the filesystem readers from grub to 
cygwin, so that I can read my linux partition from cygwin.

Colin
--
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/


BUG: mv on a mounted network drive

2004-08-27 Thread Colin JN Breame
Take a look at this output, 'cos it ain't right
$ pwd
/mnt/devserver_e/temp
$ mount
c:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type 
system (binmode)
\\devserver\dev_e_drive on /mnt/devserver_e type system (binmode)
c:\cygwin\bin on /usr/bin type system (binmode)
c:\cygwin\lib on /usr/lib type system (binmode)
c:\cygwin on / type system (binmode)
c: on /mnt/c type system (binmode)
e: on /mnt/e type system (binmode)
$ mkdir temp
$ ls
temp
$ mv * temp
mv: cannot create directory 
`temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp/temp': 
Invalid argument

temp now contains a subdirectory called temp which contains a 
subdirectory called temp...
This doesn't seem to happen on local mounts.

--
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/


Gnome for cygwin

2004-08-26 Thread Colin JN Breame
Is there a Gnome port (2.6) to cygwin?
--
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: Why umount -A is a really bad idea

2004-08-26 Thread Colin JN Breame
Or even at a break with tradition; cygmappath and cygunmappath.
Doctor Bill wrote:
It seems like there is endless confusions with cygwin mount's because
the name of the command is the same as the Unix mount command, and
some of the command line options are similar.  Has anyone given
serious consideration to renaming the command to something like,
cygmount?
   Bill
On Thu, 26 Aug 2004 12:48:38 +0200, Reini Urban [EMAIL PROTECTED] wrote:
 

Igor Pechtchanski schrieb:
   

On Wed, 25 Aug 2004, Mike wrote:
 

On Wed, 25 Aug 2004, Colin JN Breame wrote:
   

I tried this once, just to see what would happen.  I then spent the
next hour restoring the mount points.  I've learnt a valuable
lesson...
 

Why would a 'mount -a' not work after your 'umount -a' to restore the
mounts?
Mike
   

Because Cygwin's mounts aren't the same as Unix mounts.  The mount and
umount commands on Cygwin modify the mount table directly, so that a
umount really is permanent.  However (and this concerns the OP, too), you
can save the mount table as the output of mount -m, which you can later
use to restore the mounts.
 

not really.
I used to do that quite often, but since /bin and /usr/bin are not known
to cygwin anymore after umount -a (and not in the path) I came with this
workaround.
#!/bin/sh
# save mounts
BIN=`cygpath -w /bin | sed 's||/|g'`
mount -m | sed s|^mount|$BIN/mount| | tee savemounts
umount -a
# nano or $EDITOR will not work now to fix savemounts!
# restore
.. savemounts
it will look like f:/cygnus/bin/mount now. This will be found, on NT
at least.
   

For those unfortunate enough to have done a umount -a without saving the
mounts via mount -m, the minimum necessary mounts for Cygwin to work are
mount -sbc /cygdrive
mount -fsb c:/cygwin /
mount -fsb c:/cygwin/bin /usr/bin
mount -fsb c:/cygwin/lib /usr/lib
(that is provided that you installed Cygwin in c:/cygwin).
 

--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

--
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/
 


--
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/


sshd privilege separation problem

2004-08-25 Thread Colin JN Breame
Hi,
I've been running sshd and it recently stopped working.  I'm not sure 
whether I did anything to it, but I've managed to track down the problem.

If I use privilege separation (ssh-host-config), as soon as I type the 
password in, the message Connection to localhost closed. is 
displayed.  However, if I don't use privilege separation, everything 
works as it should.  I've tried syncing the groups and passwd files with 
no success.

This one is puzzling me; any ideas?
--
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/


Why umount -A is a really bad idea

2004-08-25 Thread Colin JN Breame
I tried this once, just to see what would happen.  I then spent the next 
hour restoring the mount points.  I've learnt a valuable lesson...

--
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/