src/winsup/cygwin ChangeLog fhandler.h fhandle ...

2011-05-06 Thread corinna
CVSROOT:/cvs/src
Module name:src
Changes by: cori...@sourceware.org  2011-05-06 10:56:37

Modified files:
winsup/cygwin  : ChangeLog fhandler.h fhandler_procsys.cc 
 fhandler_socket.cc syscalls.cc 

Log message:
* fhandler.h (fhandler_socket::read): Declare.
(fhandler_socket::write): Declare.
* fhandler_procsys.cc (fhandler_procsys::read): Add FIXME comment.
(fhandler_procsys::write): Ditto.
* fhandler_socket.cc (fhandler_socket::read): New method.
(fhandler_socket::write): New method.
* syscalls.cc: Rearrange order of read/write functions.
(read): Call fhandler read method directly instead of just readv.
(readv): Remove EINTR loop.  This is done in all affected fhandler's
now.
(write): Call fhandler write method directly instead of just writev.
Fix debug output.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/ChangeLog.diff?cvsroot=srcr1=1.5325r2=1.5326
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler.h.diff?cvsroot=srcr1=1.422r2=1.423
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_procsys.cc.diff?cvsroot=srcr1=1.7r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_socket.cc.diff?cvsroot=srcr1=1.273r2=1.274
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/syscalls.cc.diff?cvsroot=srcr1=1.585r2=1.586



src/winsup/cygwin ChangeLog cygwin.din posix.s ...

2011-05-06 Thread yselkowitz
CVSROOT:/cvs/src
Module name:src
Changes by: yselkow...@sourceware.org   2011-05-06 13:53:21

Modified files:
winsup/cygwin  : ChangeLog cygwin.din posix.sgml sysconf.cc 
winsup/cygwin/include/cygwin: version.h 
winsup/cygwin/include/sys: sysinfo.h 

Log message:
* sysconf.cc (sysinfo): New function.
* cygwin.din (sysinfo): Export.
* posix.sgml (std-gnu): Add sysinfo.
* include/sys/sysinfo.h (struct sysinfo): Define.
(sysinfo): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/ChangeLog.diff?cvsroot=srcr1=1.5327r2=1.5328
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/cygwin.din.diff?cvsroot=srcr1=1.238r2=1.239
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/posix.sgml.diff?cvsroot=srcr1=1.60r2=1.61
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/sysconf.cc.diff?cvsroot=srcr1=1.55r2=1.56
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/cygwin/version.h.diff?cvsroot=srcr1=1.343r2=1.344
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/sys/sysinfo.h.diff?cvsroot=srcr1=1.1r2=1.2



src/winsup/doc ChangeLog new-features.sgml

2011-05-06 Thread yselkowitz
CVSROOT:/cvs/src
Module name:src
Changes by: yselkow...@sourceware.org   2011-05-06 13:55:02

Modified files:
winsup/doc : ChangeLog new-features.sgml 

Log message:
* new-features.sgml (ov-new1.7.10): Document sysinfo.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/doc/ChangeLog.diff?cvsroot=srcr1=1.342r2=1.343
http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/doc/new-features.sgml.diff?cvsroot=srcr1=1.78r2=1.79



winsup/cygwin ChangeLog fhandler.cc fhandler_c ...

2011-05-06 Thread cgf
CVSROOT:/cvs/uberbaum
Module name:winsup
Changes by: c...@sourceware.org 2011-05-06 20:12:21

Modified files:
cygwin : ChangeLog fhandler.cc fhandler_console.cc 

Log message:
* fhandler.cc (fhandler_base::dup): Avoid duping a handle when an 
fhandler has
an archetype.
* fhandler_console.cc (fhandler_console::invisible_console): Move to 
the top.
(fhandler_console::set_close_on_exec): Don't set close-on-exec on 
handle since
it's an archetype and you don't know how many things could be using it.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/winsup/cygwin/ChangeLog.diff?cvsroot=uberbaumr1=1.5329r2=1.5330
http://sourceware.org/cgi-bin/cvsweb.cgi/winsup/cygwin/fhandler.cc.diff?cvsroot=uberbaumr1=1.385r2=1.386
http://sourceware.org/cgi-bin/cvsweb.cgi/winsup/cygwin/fhandler_console.cc.diff?cvsroot=uberbaumr1=1.230r2=1.231



winsup/cygwin ChangeLog fhandler.h

2011-05-06 Thread cgf
CVSROOT:/cvs/uberbaum
Module name:winsup
Changes by: c...@sourceware.org 2011-05-06 20:22:45

Modified files:
cygwin : ChangeLog fhandler.h 

Log message:
* fhandler.h (fhandler_base::close_with_arch): Make non-virtual.
(fhandler_base::open_fs): Move closer to it's close counterpart.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/winsup/cygwin/ChangeLog.diff?cvsroot=uberbaumr1=1.5330r2=1.5331
http://sourceware.org/cgi-bin/cvsweb.cgi/winsup/cygwin/fhandler.h.diff?cvsroot=uberbaumr1=1.424r2=1.425



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

2011-05-06 Thread Corinna Vinschen
On May  5 23:08, Christian Franke wrote:
 Corinna Vinschen wrote:
 On May  5 18:51, Christian Franke wrote:
 This patch fixes access(/proc/registry/HKEY_PERFORMANCE_DATA,
 R_OK) which always fails with EBADF.
 
 Christian
 
 2011-05-05  Christian Franke...
 
 * security.cc (check_registry_access): Handle missing
 security descriptor of HKEY_PERFORMANCE_DATA.
 Do you have check in rights?  If so, please check in.
 
 
 No check in rights, sorry :-)

http://sourceware.org/cgi-bin/pdw/ps_form.cgi, project Cygwin, approver me.

However, I just had another look into your patch and I have a problem
here.  On what system and with what type of user account did you test?

Here's what I get on Windows 2008 and W7:

$ ~/tests/access /proc/registry/HKEY_PERFORMANCE_DATA
access (/proc/registry/HKEY_PERFORMANCE_DATA, F_OK) = 0
access (/proc/registry/HKEY_PERFORMANCE_DATA, R_OK) = -1 Permission denied
access (/proc/registry/HKEY_PERFORMANCE_DATA, W_OK) = -1 Read-only file system
access (/proc/registry/HKEY_PERFORMANCE_DATA, X_OK) = -1 Bad file descriptor

The result is the same on W7 and 2008.  I tried with a normal user
account, as well as with an admin account, with full rights as well as
UAC-restricted.


Corinna

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


Re: [PATCH] sysinfo

2011-05-06 Thread Corinna Vinschen
On May  6 00:09, Yaakov (Cygwin/X) wrote:
 This implements sysinfo(2), a GNU extension:
 
 http://www.kernel.org/doc/man-pages/online/pages/man2/sysinfo.2.html
 
 The code is partially based on our /proc/meminfo and /proc/uptime code.
 (My next patch will port the former to use sysinfo(2), but the latter
 cannot as it uses .01s resolution, more than sysinfo's 1s.  That patch
 will also fix /proc/meminfo and /proc/swaps for RAM and paging files
 larger than 4GB.)
 
 Patches for winsup/cygwin and winsup/doc, plus a test program, attached.
 
 
 Yaakov
 

 2011-05-05  Yaakov Selkowitz  yselkowitz@...
 
   * sysconf.cc (sysinfo): New function.
   * cygwin.din (sysinfo): Export.
   * posix.sgml (std-gnu): Add sysinfo.
   * include/sys/sysinfo.h (struct sysinfo): Define.
   (sysinfo): Declare.
   * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

That looks good to me.  Just a question...

 +  /* FIXME: unsupported */
 +  info-loads[0] = 0UL;
 +  info-loads[1] = 0UL;
 +  info-loads[2] = 0UL;
 +  info-sharedram = 0UL;
 +  info-bufferram = 0UL;

Isn't bufferram the sum of paged and non-paged pool?


Corinna

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


Re: [PATCH] sysinfo

2011-05-06 Thread Yaakov (Cygwin/X)
On Fri, 2011-05-06 at 10:11 +0200, Corinna Vinschen wrote:
 On May  6 00:09, Yaakov (Cygwin/X) wrote:
  This implements sysinfo(2), a GNU extension:
  
  http://www.kernel.org/doc/man-pages/online/pages/man2/sysinfo.2.html
  
  The code is partially based on our /proc/meminfo and /proc/uptime code.
  (My next patch will port the former to use sysinfo(2), but the latter
  cannot as it uses .01s resolution, more than sysinfo's 1s.  That patch
  will also fix /proc/meminfo and /proc/swaps for RAM and paging files
  larger than 4GB.)
  
  Patches for winsup/cygwin and winsup/doc, plus a test program, attached.
  
  
  Yaakov
  
 
  2011-05-05  Yaakov Selkowitz  yselkowitz@...
  
  * sysconf.cc (sysinfo): New function.
  * cygwin.din (sysinfo): Export.
  * posix.sgml (std-gnu): Add sysinfo.
  * include/sys/sysinfo.h (struct sysinfo): Define.
  (sysinfo): Declare.
  * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
 
 That looks good to me.  Just a question...
 
  +  /* FIXME: unsupported */
  +  info-loads[0] = 0UL;
  +  info-loads[1] = 0UL;
  +  info-loads[2] = 0UL;
  +  info-sharedram = 0UL;
  +  info-bufferram = 0UL;
 
 Isn't bufferram the sum of paged and non-paged pool?

The comment alongside the bufferram member of struct sysinfo, as defined
in the manpage above, says Memory used by buffers.  A similar meaning
is given for the Buffers: line of Linux's /proc/meminfo:

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-proc-meminfo.html

So IIUC, no.


Yaakov




[PATCH] Fix /proc/meminfo and /proc/swaps for 4GB

2011-05-06 Thread Yaakov (Cygwin/X)
As promised, this patch ports the /proc/meminfo code to use sysinfo(2),
and fixes the case where RAM or swap space totals more than 4GB.  It
also fixes the /proc/swaps code for paging files larger than 4GB.

For example:

$ cat /proc/meminfo
total: used: free:
Mem: 429305856018281512962464907264
Swap:   12884901888  14680064   12870221824
MemTotal:4192440 kB
MemFree: 2407136 kB
MemShared: 0 kB
HighTotal: 0 kB
HighFree:  0 kB
LowTotal:4192440 kB
LowFree: 2407136 kB
SwapTotal:  12582912 kB
SwapFree:   12568576 kB

$ cat /proc/swaps
FilenameTypeSizeUsedPriority
/cygdrive/c/pagefile.sysfile8388608 8192
0
/cygdrive/d/pagefile.sysfile4194304 6144
0

Patch attached.


Yaakov

2011-05-06  Yaakov Selkowitz  yselkowitz@...

	* fhandler_proc.cc (format_proc_meminfo): Rewrite to use sysinfo().
	Support RAM and swap space larger than 4GB.
	(format_proc_swaps): Support paging files larger than 4GB.

Index: fhandler_proc.cc
===
RCS file: /cvs/src/src/winsup/cygwin/fhandler_proc.cc,v
retrieving revision 1.102
diff -u -r1.102 fhandler_proc.cc
--- fhandler_proc.cc	19 Apr 2011 08:39:38 -	1.102
+++ fhandler_proc.cc	6 May 2011 04:24:33 -
@@ -24,6 +24,7 @@
 #include tls_pbuf.h
 #include sys/utsname.h
 #include sys/param.h
+#include sys/sysinfo.h
 #include ntdll.h
 #include winioctl.h
 #include wchar.h
@@ -402,63 +403,28 @@
 static _off64_t
 format_proc_meminfo (void *, char *destbuf)
 {
-  unsigned long mem_total = 0UL, mem_free = 0UL, swap_total = 0UL,
-		swap_free = 0UL;
-  MEMORYSTATUS memory_status;
-  GlobalMemoryStatus (memory_status);
-  mem_total = memory_status.dwTotalPhys;
-  mem_free = memory_status.dwAvailPhys;
-  PSYSTEM_PAGEFILE_INFORMATION spi = NULL;
-  ULONG size = 512;
-  NTSTATUS ret = STATUS_SUCCESS;
+  unsigned long long mem_total, mem_free, swap_total, swap_free;
+  struct sysinfo info;
+
+  sysinfo (info);
+  mem_total = (unsigned long long) info.totalram * info.mem_unit;
+  mem_free = (unsigned long long) info.freeram * info.mem_unit;
+  swap_total = (unsigned long long) info.totalswap * info.mem_unit;
+  swap_free = (unsigned long long) info.freeswap * info.mem_unit;
 
-  spi = (PSYSTEM_PAGEFILE_INFORMATION) malloc (size);
-  if (spi)
-{
-  ret = NtQuerySystemInformation (SystemPagefileInformation, (PVOID) spi,
-  size, size);
-  if (ret == STATUS_INFO_LENGTH_MISMATCH)
-	{
-	  free (spi);
-	  spi = (PSYSTEM_PAGEFILE_INFORMATION) malloc (size);
-	  if (spi)
-	ret = NtQuerySystemInformation (SystemPagefileInformation,
-	(PVOID) spi, size, size);
-	}
-}
-  if (!spi || ret || (!ret  GetLastError () == ERROR_PROC_NOT_FOUND))
-{
-  swap_total = memory_status.dwTotalPageFile - mem_total;
-  swap_free = memory_status.dwAvailPageFile - mem_total;
-}
-  else
-{
-  PSYSTEM_PAGEFILE_INFORMATION spp = spi;
-  do
-	{
-	  swap_total += spp-CurrentSize * getsystempagesize ();
-	  swap_free += (spp-CurrentSize - spp-TotalUsed)
-		   * getsystempagesize ();
-	}
-  while (spp-NextEntryOffset
-	  (spp = (PSYSTEM_PAGEFILE_INFORMATION)
-			   ((char *) spp + spp-NextEntryOffset)));
-}
-  if (spi)
-free (spi);
   destbuf = (char *) crealloc_abort (destbuf, 512);
-  return __small_sprintf (destbuf,  total:  used:  free:\n
-   Mem:  %10lu %10lu %10lu\n
-   Swap: %10lu %10lu %10lu\n
-   MemTotal: %10lu kB\n
-   MemFree:  %10lu kB\n
+  return sprintf (destbuf, total: used: free:\n
+   Mem:  %13llu %13llu %13llu\n
+   Swap: %13llu %13llu %13llu\n
+   MemTotal: %10llu kB\n
+   MemFree:  %10llu kB\n
    MemShared: 0 kB\n
    HighTotal: 0 kB\n
    HighFree:  0 kB\n
-   LowTotal: %10lu kB\n
-   LowFree:  %10lu kB\n
-   SwapTotal:%10lu kB\n
-   SwapFree: %10lu kB\n,
+   LowTotal: %10llu kB\n
+   LowFree:  %10llu kB\n
+   SwapTotal:%10llu kB\n
+   SwapFree: %10llu kB\n,
    mem_total, mem_total - mem_free, mem_free,
    swap_total, swap_total - swap_free, swap_free,
    mem_total  10, mem_free  10,
@@ -1298,7 +1264,7 @@
 static _off64_t
 format_proc_swaps (void *, char *destbuf)
 {
-  unsigned long total = 0UL, used = 0UL;
+  unsigned long long total = 0ULL, used = 0ULL;
   char *filename = NULL;
   ssize_t filename_len;
   PSYSTEM_PAGEFILE_INFORMATION spi = NULL;
@@ -1332,14 +1298,14 @@
   PSYSTEM_PAGEFILE_INFORMATION spp = spi;
   do
 	{
-	  total = spp-CurrentSize * getsystempagesize ();
-	  used = spp-TotalUsed * getsystempagesize ();
+	  total = (unsigned long long) spp-CurrentSize * getsystempagesize ();
+	  used = (unsigned long 

Don't use 2011-05-05 22:37:25 UTC snapshot

2011-05-06 Thread Christopher Faylor
Last night's snapshot has a revamp of some of the tty/console handling.
It worked fine on my Windows 7 x64 system but apparently I was just
lucky.  Please don't use it until you hear from me that things are
fixed.

cgf

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



CYGWIN

2011-05-06 Thread rdickert
Technical assistance required - TIA

I'm presently a software packager taking applications from XP and porting 
them/repackaging them 
to W7 - 64-bit.  The current version on site is  1.5.12 and I believe the 
latest is 1.7.9-1.

In order to package this correctly, I need to find out all of the modules / 
apps that are being 
installed into cygwin and then select/install those same modules on the W7 
platform.
Is there some type of command / process that would tell me the information I 
need?
I'm not a Linux/Unix person and I'm asking for assistance.

The other issue is I need to download the complete version without running 
setup as the firewall/proxy
won't cooperate with setup.exe.  I don't feel it is my responsibility to go to 
my home and download
it and bring it in but I will if I have to.

Is there the possibility to acquire a CD/DVD?

Again, thanks in advance.

Bob

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



Re: CYGWIN

2011-05-06 Thread Eric Blake
On 05/06/2011 09:27 AM, rdick...@cinci.rr.com wrote:
 Technical assistance required - TIA
 
 I'm presently a software packager taking applications from XP and porting 
 them/repackaging them 
 to W7 - 64-bit.  The current version on site is  1.5.12 and I believe the 
 latest is 1.7.9-1.

Cygwin is a 32-bit dll.  So all cygwin apps are necessarily 32-bit apps.

And that isn't going to change without a LOT of porting effort.  Patches
welcome.  But in the meantime, you'll save yourself a LOT of effort by
using pre-built 32-bit cygwin binaries on 64-bit W7, rather than trying
to rebuild everything from scratch, and instead you should focus your
efforts on helping improve cygwin1.dll to be useful as a 64-bit dll.

-- 
Eric Blake   ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: CYGWIN

2011-05-06 Thread Illia Bobyr
On 5/6/2011 10:27 AM, rdick...@cinci.rr.com wrote:

 Technical assistance required - TIA

 I'm presently a software packager taking applications from XP and 
 porting them/repackaging them
 to W7 - 64-bit.  The current version on site is  1.5.12 and I believe 
 the latest is 1.7.9-1.

 In order to package this correctly, I need to find out all of the 
 modules / apps that are being
 installed into cygwin


cygcheck -c -d will list all the packages installed into the current 
Cygwin environment along with their versions.
This will give you a list of package names in a pkg.list file:

cygcheck -c -d | tail -n +3 | awk '{print $1}'  pkg.list

 and then select/install those same modules on the W7 platform.


setup.exe can download selected packages, I guess, along with all the 
dependencies and it can install from a local directory.
It also can be controlled from the command line (see setup.exe --help).
It seems that it would be possible to download all the packages from a 
list on one machine and then install them on another machine, but I can 
not make setup download a list of packages from a file.  I images that 
this would work:

/c/Installs/Cygwin/setup --download --local-package-dir 
'c:\temp\local-packages' --packages $( pkg.list)

but it does not...


Another option would be fetching the packages from one of the mirrors.  
For example http://mirror.mcs.anl.gov/cygwin/release/.
There is a file that setup uses to map package names to the 
corresponding files: http://mirror.mcs.anl.gov/cygwin/setup.ini
A rather simple awk script can give you a list of URL to fetch given a 
list of package names.  But, considering that I am not 100% sure that I 
got your initial question right I'm not writing it right now ;)  
Besides, maybe someone will show how to use setup.exe for the task.

 The other issue is I need to download the complete version without 
 running setup as the firewall/proxy
 won't cooperate with setup.exe.


Setup.exe can deal with proxies.  If your IE can fetch files, setup.exe 
should be able as well.
Just use the IE settings in the setup.exe.
Alternatively, if your IE is using a script to configure its proxy 
settings, just download the script - for me it is a simple JavaScript 
and the proxy IP is right there.

Ilya Bobyr


Issue with SCP and SSH on Windows 7

2011-05-06 Thread Metroshica

I have recently written a script in Windows Server Edition 2008 that SSHes
into a few linux servers, and then uses SCP to copy a file out of them. The
issue I'm having is with SSH keys getting set up, and cygwin trying to
create a .ssh directory in the C:/ directory, instead of where cygwin is
located. I'm running this program through the standard windows command
prompt, not cygwin's shell, as it is an automated process, and I don't know
how to automatically run a program in cygwin. Anyone know how I can change
the home directory to be C:/cygwin/home/user instead of the base C:/ dir, or
anyone know how to automatically run a script in cygwin? Thanks for the
help.
-- 
View this message in context: 
http://old.nabble.com/Issue-with-SCP-and-SSH-on-Windows-7-tp31561012p31561012.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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



Re: Issue with SCP and SSH on Windows 7

2011-05-06 Thread Jeremy Bopp
On 5/6/2011 12:54, Metroshica wrote:
 
 I have recently written a script in Windows Server Edition 2008 that SSHes
 into a few linux servers, and then uses SCP to copy a file out of them. The
 issue I'm having is with SSH keys getting set up, and cygwin trying to
 create a .ssh directory in the C:/ directory, instead of where cygwin is
 located.

Check to make sure that you don't have the HOME environment variable
configured to C:.  If it is, you need to remove it just in case, but you
may try adding it back once you get things working.  Next, you need to
check that the user account used to run scp has an entry in the
/etc/passwd file within the Cygwin installation:

grep ^the_user: /etc/passwd

That won't output anything if the_user does not have an entry in that
file.  Otherwise, you'll see the record for the_user.  If you see such a
record, take a look at the path that appears between the last and second
to last colons in the line.  That path is the home directory that Cygwin
programs such as the SSH tools will use.  Set it to a Cygwin-style path
that points to the proper location.

If the grep command doesn't output anything, you can add an appropriate
entry by running the following from the bash shell:

mkpasswd -u the_user -d /etc/passwd

If the account is *not* a domain account, use this instead:

mkpasswd -u the_user -l /etc/passwd

These changes should correct the issue by allowing the SSH family of
programs to correctly find the user's home directory as configured under
Cygwin.

 I'm running this program through the standard windows command
 prompt, not cygwin's shell, as it is an automated process, and I don't know
 how to automatically run a program in cygwin. Anyone know how I can change
 the home directory to be C:/cygwin/home/user instead of the base C:/ dir, or
 anyone know how to automatically run a script in cygwin? Thanks for the
 help.

You should be fine with running things directly from Windows programs,
including the command prompt, unless you need extra environment settings
provided by Cygwin to login shells.  Since you're otherwise running
things successfully apparently, don't worry about changing this part.

-Jeremy

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



Re: Issue with SCP and SSH on Windows 7

2011-05-06 Thread Metroshica

Jeremy, I don't know who you are, but I don't feel uncomfortable saying I
love you. Thank you so much for the help, cleared the issue right up.


Jeremy Bopp-3 wrote:
 
 On 5/6/2011 12:54, Metroshica wrote:
 
 I have recently written a script in Windows Server Edition 2008 that
 SSHes
 into a few linux servers, and then uses SCP to copy a file out of them.
 The
 issue I'm having is with SSH keys getting set up, and cygwin trying to
 create a .ssh directory in the C:/ directory, instead of where cygwin is
 located.
 
 Check to make sure that you don't have the HOME environment variable
 configured to C:.  If it is, you need to remove it just in case, but you
 may try adding it back once you get things working.  Next, you need to
 check that the user account used to run scp has an entry in the
 /etc/passwd file within the Cygwin installation:
 
 grep ^the_user: /etc/passwd
 
 That won't output anything if the_user does not have an entry in that
 file.  Otherwise, you'll see the record for the_user.  If you see such a
 record, take a look at the path that appears between the last and second
 to last colons in the line.  That path is the home directory that Cygwin
 programs such as the SSH tools will use.  Set it to a Cygwin-style path
 that points to the proper location.
 
 If the grep command doesn't output anything, you can add an appropriate
 entry by running the following from the bash shell:
 
 mkpasswd -u the_user -d /etc/passwd
 
 If the account is *not* a domain account, use this instead:
 
 mkpasswd -u the_user -l /etc/passwd
 
 These changes should correct the issue by allowing the SSH family of
 programs to correctly find the user's home directory as configured under
 Cygwin.
 
 I'm running this program through the standard windows command
 prompt, not cygwin's shell, as it is an automated process, and I don't
 know
 how to automatically run a program in cygwin. Anyone know how I can
 change
 the home directory to be C:/cygwin/home/user instead of the base C:/ dir,
 or
 anyone know how to automatically run a script in cygwin? Thanks for the
 help.
 
 You should be fine with running things directly from Windows programs,
 including the command prompt, unless you need extra environment settings
 provided by Cygwin to login shells.  Since you're otherwise running
 things successfully apparently, don't worry about changing this part.
 
 -Jeremy
 
 --
 Problem reports:   http://cygwin.com/problems.html
 FAQ:   http://cygwin.com/faq/
 Documentation: http://cygwin.com/docs.html
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Issue-with-SCP-and-SSH-on-Windows-7-tp31561012p31562709.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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



registry.cc: debug_printf() intentionally changed to system_printf() ?

2011-05-06 Thread Christian Franke
winsup/cygwin/registry.cc CVS 1.42 changed debug_printf() to 
system_printf() in get_registry_hive_path().


This results in bogus messages e.g. if $USERPROFILE is evaluated by 
spenv::retrieve() in exec*()


Testcase:
$ cygdrop -- echo hello
  2 [main] cygdrop 2716 get_registry_hive_path: ProfileImagePath 
for S-1-5-21-

hello

Christian


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