Re: rsync anyone?

2016-01-03 Thread Rob Schramm
Pax Directory to dataset on lpar 1, unpax data set to Directory on lpar 2.
Add whatever transmission method in between.

I resisted pax for a long time.. But it always works for me.  I have had
some unpleasant surprises using techniques from *nix that don't always do
what I think they should on z/OS.

YMMV,

Rob Schramm

On Tue, Dec 29, 2015, 11:17 AM Paul Gilmartin <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Mon, 28 Dec 2015 21:11:49 -0500, Shmuel Metz (Seymour J.) wrote:
> >
> >>a predominantly ASCII world.
> >
> >I wish! The real world is a morass of different code pages, not always
> >declared in MIME header fields.
> >
> And, irritatingly, when SMTP, either on z/OS or z/VM converts incoming
> messages from (e.g.) ISO8859-1 to IBM-1047 it doesn't adjust the MIME
> headers accordingly.
>
> -- gil
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: rsync anyone?

2015-12-29 Thread Paul Gilmartin
On Mon, 28 Dec 2015 21:11:49 -0500, Shmuel Metz (Seymour J.) wrote:
>
>>a predominantly ASCII world.
>
>I wish! The real world is a morass of different code pages, not always
>declared in MIME header fields.
>
And, irritatingly, when SMTP, either on z/OS or z/VM converts incoming
messages from (e.g.) ISO8859-1 to IBM-1047 it doesn't adjust the MIME
headers accordingly.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread Paul Gilmartin
On Tue, 29 Dec 2015 16:01:15 +0100, Peter Hunkeler wrote:
>
>To run commands in a "su" shell environment, you have to write all the 
>commands into a UNIX file first, and then call "su" by redirecting stdin to 
>that UNIX file.
>
>echo "id" > /tmp/sucommandfile
>su < /tmp/sucommandfile
>
>This will show uid=0, because it is the sub shell (uid=0), which is reading 
>from /tmp/sucommandfile as if it was stdin, and execute the commands found 
>therein.
> 
Did this work for you on z/OS?  Looking for alternatives on a Linux system
(I haven't su on z/OS):

501 $ echo id | su
su: must be run from a terminal
502 $

It's a security feature.  But:

500 $ sudo sh -c id
[sudo] password for :
uid=0(root) gid=0(root) groups=0(root)
501 $
500 $ echo id | sudo sh
[sudo] password for : 
uid=0(root) gid=0(root) groups=0(root)
501 $

... and I belive sudo is now available in Ported Tools.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread Chris Hoelscher
does not do what you think it does ...

or, in the words of Inigo Montoya ..

you keep using that command. I do not think it means what you think it means ...

Chris Hoelscher
Technology Architect, Database Infrastructure Services
Technology Solution Services
: humana.com
123 East Main Street
Louisville, KY 40202
Humana.com
(502) 714-8615, (502) 476-2538


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Tuesday, December 29, 2015 11:48 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: [IBM-MAIN] BPXBATCH "SH ...; su; pax ..." does not do what you 
think it does (was: rsync anyone?)

On Tue, Dec 29, 2015 at 9:01 AM, Peter Hunkeler <p...@gmx.ch> wrote:

> ​
>
> To run commands in a "su" shell environment, you have to write all the 
> commands into a UNIX file first, and then call "su" by redirecting 
> stdin to that UNIX file.
>
>
> echo "id" > /tmp/sucommandfile
> su < /tmp/sucommandfile
>
>
​The following also works:

$
{ cat < id
> whoami
> EOF
> } | su
uid=0(
​ROOT
) gid=1000(
​
) groups=2000(
​
),0(SYS1)
ROOT
$

​



--
Computer Science is the only discipline in which we view adding a new wing to a 
building as being maintenance -- Jim Horning

Schrodinger's backup: The condition of any backup is unknown until a restore is 
attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material.  If you receive this 
material/information in error,
please contact the sender and delete or destroy the material/information.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread John McKown
On Tue, Dec 29, 2015 at 9:01 AM, Peter Hunkeler  wrote:

> ​
>
> To run commands in a "su" shell environment, you have to write all the
> commands into a UNIX file first, and then call "su" by redirecting stdin to
> that UNIX file.
>
>
> echo "id" > /tmp/sucommandfile
> su < /tmp/sucommandfile
>
>
​The following also works:

$
{ cat < id
> whoami
> EOF
> } | su
uid=0(
​ROOT
) gid=1000(
​
) groups=2000(
​
),0(SYS1)
ROOT
$

​



-- 
Computer Science is the only discipline in which we view adding a new wing
to a building as being maintenance -- Jim Horning

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread John McKown
On Tue, Dec 29, 2015 at 11:17 AM, Chris Hoelscher 
wrote:

> does not do what you think it does ...
>
> or, in the words of Inigo Montoya ..
>
> you keep using that command. I do not think it means what you think it
> means ...
>

​What am I missing on that. I'm always wanting to learn stuff. Especially
when I give wrong advice. I don't like doing that.​




>
> Chris Hoelscher
> Technology Architect, Database Infrastructure Services
> Technology Solution Services
> : humana.com
> 123 East Main Street
> Louisville, KY 40202
> Humana.com
> (502) 714-8615, (502) 476-2538
>
> --
Computer Science is the only discipline in which we view adding a new wing
to a building as being maintenance -- Jim Horning

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread Shmuel Metz (Seymour J.)
In
<29b16432403d6c45a9bee5f0302d191779ba2...@vss-exchmb1.sfg.corp.LOCAL>,
on 12/29/2015
   at 06:24 PM, "Pommier, Rex"  said:

>The only thing you're missing on Chris' response was the movie
>reference.

Movie? The book came first.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread Pommier, Rex
John,

The only thing you're missing on Chris' response was the movie reference.  He 
was making a play on a line said by Inigo Montoya in the movie "The Princess 
Bride".  The actual quote is "You keep using that word.  I do not think it 
means what you think it means".

Rex

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of John McKown
Sent: Tuesday, December 29, 2015 11:26 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does 
(was: rsync anyone?)

On Tue, Dec 29, 2015 at 11:17 AM, Chris Hoelscher <choelsc...@humana.com>
wrote:

> does not do what you think it does ...
>
> or, in the words of Inigo Montoya ..
>
> you keep using that command. I do not think it means what you think it
> means ...
>

​What am I missing on that. I'm always wanting to learn stuff. Especially
when I give wrong advice. I don't like doing that.​




>
> Chris Hoelscher
> Technology Architect, Database Infrastructure Services
> Technology Solution Services
> : humana.com
> 123 East Main Street
> Louisville, KY 40202
> Humana.com
> (502) 714-8615, (502) 476-2538
>
> --
Computer Science is the only discipline in which we view adding a new wing
to a building as being maintenance -- Jim Horning

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


The information contained in this message is confidential, protected from 
disclosure and may be legally privileged.  If the reader of this message is not 
the intended recipient or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any disclosure, 
distribution, copying, or any action taken or action omitted in reliance on it, 
is strictly prohibited and may be unlawful.  If you have received this 
communication in error, please notify us immediately by replying to this 
message and destroy the material in its entirety, whether in electronic or hard 
copy format.  Thank you.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread Skip Robinson
This thread is driving me crazy. It's the last week of 2015, so scr*w the
rules. All week is Friday.

I encountered an omen this morning. On my local NPR station--KPCC--there was
a discussion of death and how it's clinically determined and officially
declared. It's not a bipolar condition, according to the researcher
interviewed. There was explicit reference to Princess Bride, where the Black
Knight, in seriously dire straits, was described as being somewhere on a
continuum from fully alive to fully dead. He was, at one juncture, mostly
dead. A marvelous film. Never read the book. Only know the 'cheeky'
adaptation by Rob Reiner.

So what was the misunderstood word? INCONCEIVABLE. A word immortalized on
screen by Wallace Shawn. And, to bend the conversation back to Mainframe, a
word that some of us have used emphatically to describe an 'impossible'
situation encountered in our daily work. Let's hope that in 2016 we find a
happier conclusion than Vizinni did. 

.
.
.
J.O.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler 
SHARE MVS Program Co-Manager
323-715-0595 Mobile
jo.skip.robin...@att.net
jo.skip.robin...@gmail.com

> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU]
> On Behalf Of Peter Hunkeler
> Sent: Tuesday, December 29, 2015 11:34 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: [Bulk] AW: Re: BPXBATCH "SH ...; su; pax ..." does not do what
you think
> it does (was: rsync anyone?)
> 
> 
> >does not do what you think it does ...
>  >
> >or, in the words of Inigo Montoya ..
>  >
> >you keep using that command. I do not think it means what you think it
means
> ...
> 
> 
> 
> 
> I don't get your point, I'm afraid.
> 
> 
> --
> Peter Hunkeler

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


AW: Re: BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread Peter Hunkeler

>>echo "id" > /tmp/sucommandfile
>>su < /tmp/sucommandfile
>>
>>This will show uid=0, because it is the sub shell (uid=0), which is reading 
>>from /tmp/sucommandfile as if it >was stdin, and execute the commands found 
>>therein.
>>
>Did this work for you on z/OS?  Looking for alternatives on a Linux system
>(I haven't su on z/OS):




Yes, it does indeed. I don't have su right neither but I asked a colleage who 
has to verify for me (on z/OS V2.1)


--
Peter Hunkeler



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: rsync anyone?

2015-12-29 Thread nitz-ibm
> Q).  Does anyone have a better way to move a directory that has files and 
> subdirectories to a different LPAR?  Or do you just keep installing the same 
> code for each instance?
Not sure it is a better way, but when I migrated to 2.1, I converted all ZFSs 
back to HFSs since I find them infinitely easier to handle. I used bpxbatch:

//S1 EXEC PGM=BPXBATCH  
//STDOUT  DD  SYSOUT=*  
//STDERR  DD  SYSOUT=*  
//STDPARM DD  * 
sh cd /u/zfs;su;pax -rwvCMX -p eW . /u/hfs

Setting the directory to what you need to copy will copy just about anything 
including permissions, uids and gids. I also had security problems doing this 
on the originating system where I tried it first. When I went into OMVS and 
used an OMVS shell to issue the pax command, everything (including all 
ownerships) were correctly copied. Using bpxbatch I saw RACF messages for 
DIRACCESS, and some ownerships were lost with some error message that I haven't 
kept. I needed the output for reference and I wasn't familiar enough with the 
commands to pipe it somewhere. I ended up doing the conversion on 'my' system, 
and here it worked like a charm using bpxbatch.

One problem may have been that IBMUSER (who owned most of the files since they 
were installed under IBMUSER) on the originating system had a uid of 2 (not 
0!). I remember that I did quite a bit of reading on the shell and I even 
changed some settings for my own userid, but I was unable to determine why I 
got the errors on the originating system. As far as I could see, all RACF 
definitions were in place on both systems.

On 'my' system, I ended up correcting ownership to 'my' RACF database and its 
uids/gids, which looked like this:

//S1 EXEC PGM=BPXBATCH   
//STDOUT  DD  SYSOUT=*   
//STDERR  DD  SYSOUT=*   
//STDPARM DD  *  
sh su; find /u/mp1 -group 1 -exec chgrp -h 0 äü ';'   

or another command:
sh su; find /u/mp1 -user 9500 -exec chown -h 0 äü ';'  

I was quite proud of myself of recognizing the codepage problem. :-)

Of course, this was all a one-time effort on my part.

Barbara

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: rsync anyone?

2015-12-29 Thread Shmuel Metz (Seymour J.)
In <20151229094330.0b444324d33c5248eb75a...@gmx.net>, on 12/29/2015
   at 09:43 AM, nitz-ibm  said:

>One problem may have been that IBMUSER (who owned most of the 
>files since they were installed under IBMUSER) on the originating 
>system had a uid of 2 (not 0!).

And that was bad because? I didn't even give myself UID 0.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


BPXBATCH "SH ...; su; pax ..." does not do what you think it does (was: rsync anyone?)

2015-12-29 Thread Peter Hunkeler

> sh cd /u/zfs;su;pax -rwvCMX -p eW . /u/hfs


This does not do what you think it does. The pax command will run under the 
initial uid and not with uid=o as you might hope. I recently explained this on 
the RACF-L list as follows:


Starting in the initial shell process, most (shell) commands will be run in a 
new child process of this parent shell process. If you issue "sh" you will end 
up in a new sub shell process. The parent shell is waiting for the sub shell to 
end. Issuing "su" is also startting a sub shell in a new process, but will 
additionally try to switch to uid=0 in the *new subshell process*. Again the 
parent shell will wait for the sub shell to terminate, before it will run the 
next command. At that time, the uid=0 sub shell process has ended, so the uid=0 
environment does no longer exist. The next command is again starting with the 
initial parent shell's environment.


The ";" separates shell commands; they are run sequentially. Same with "&&" and 
"||", they just add the "run only if previous command ran successfully (&&) or 
unsucessfully (||)" to it. Still most commands are run in subshells.

To run commands in a "su" shell environment, you have to write all the commands 
into a UNIX file first, and then call "su" by redirecting stdin to that UNIX 
file.


echo "id" > /tmp/sucommandfile
su < /tmp/sucommandfile


This will show uid=0, because it is the sub shell (uid=0), which is reading 
from /tmp/sucommandfile as if it was stdin, and execute the commands found 
therein.
--
Peter Hunkeler

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: rsync anyone?

2015-12-29 Thread Shmuel Metz (Seymour J.)
In <5189899169969403.wa.paulgboulderaim@listserv.ua.edu>, on
12/28/2015
   at 05:22 PM, Paul Gilmartin
<000433f07816-dmarc-requ...@listserv.ua.edu> said:

>a predominantly ASCII world.

I wish! The real world is a morass of different code pages, not always
declared in MIME header fields.
 
-- 
 Shmuel (Seymour J.) Metz, SysProg and JOAT
 ISO position; see  
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: EXTERNAL: Re: rsync anyone?

2015-12-28 Thread Eosze, Jonathan L.
I ported rsync-2.5.5 a few years ago:

Below and attached is the diff from the original rsync-2.5.5.tar.gz.

I also created /usr/local/bin/rsync.sh since we put rsync in a non-standard 
location:

#!/bin/sh

# This is a script to help provide a wrapper around rsync for usability reasons

/usr/local/bin/rsync -e ssh --rsync-path=/usr/local/bin/rsync "$@"
exit $?

# example:
# rsync.sh -av --delete --dry-run zxmvs01@z001:/area/host/lsm/products/ 
/area/host/lsm/products
# rsync.sh -a --delete --stats --progress --one-file-system /u// 
/u/plc5611/tmp/


diff -cr rsync-2.5.5/Makefile.in rsync-2.5.5-new/Makefile.in
*** rsync-2.5.5/Makefile.inMon Mar 25 05:36:56 2002
--- rsync-2.5.5-new/Makefile.in Wed May 15 11:32:50 2002
***
*** 24,35 
  .SUFFIXES: .c .o
  
  LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o \
!   lib/permstring.o \
!   @LIBOBJS@
  ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
zlib/zutil.o zlib/adler32.o 
! OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o 
main.o checksum.o match.o syscall.o log.o backup.o
  OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o 
fileio.o batch.o \
clientname.o
  DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o 
authenticate.o
--- 24,34 
  .SUFFIXES: .c .o
  
  LIBOBJ=lib/fnmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o \
!lib/permstring.o @LIBOBJS@
  ZLIBOBJ=zlib/deflate.o zlib/infblock.o zlib/infcodes.o zlib/inffast.o \
zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
zlib/zutil.o zlib/adler32.o 
! OBJS1=rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util.o 
main.o checksum.o match.o syscall.o log.o backup.o cpconv.o
  OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o 
fileio.o batch.o \
clientname.o
  DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o 
authenticate.o
***
*** 45,51 
  # note that the -I. is needed to handle config.h when using VPATH
  .c.o:
  @OBJ_SAVE@
!   $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< @CC_SHOBJ_FLAG@
  @OBJ_RESTORE@
  
  all: rsync
--- 45,51 
  # note that the -I. is needed to handle config.h when using VPATH
  .c.o:
  @OBJ_SAVE@
!   $(CC) -I. -I$(srcdir) $(CFLAGS) @CC_SHOBJ_FLAG@ -c $<
  @OBJ_RESTORE@
  
  all: rsync
diff -cr rsync-2.5.5/lib/getaddrinfo.c rsync-2.5.5-new/lib/getaddrinfo.c
*** rsync-2.5.5/lib/getaddrinfo.c  Fri Dec 14 06:33:12 2001
--- rsync-2.5.5-new/lib/getaddrinfo.c   Tue May 14 14:12:24 2002
***
*** 259,266 
--- 259,278 
/* error check for hints */
if (hints->ai_addrlen || hints->ai_canonname ||
hints->ai_addr || hints->ai_next)
+ #if defined(__MVS__)
+   /* hints seem to be unknown to OS390 Open Edition, use 
EAI_MAX 
+ */
+   ERR(EAI_MAX); /* xxx */
+ #else
ERR(EAI_BADHINTS); /* xxx */
+ #endif
+ #if defined(__MVS__)
+   /* when compiling on OS390 Open Edition AI_MASK appears to be */
+   /* undefined, include expansion literally here */
+   if (hints->ai_flags & ~(AI_PASSIVE | AI_CANONNAME | 
AI_NUMERICHOST))
+ #else
if (hints->ai_flags & ~AI_MASK)
+ #endif
ERR(EAI_BADFLAGS);
switch (hints->ai_family) {
case PF_UNSPEC:
***
*** 294,306 
--- 306,330 
case SOCK_DGRAM:
if (pai->ai_protocol != IPPROTO_UDP &&
pai->ai_protocol != ANY)
+ #if defined(__MVS__)
+   /* hints seem to be unknown to OS390 Open 
Edition, use 
+ EAI_MAX */
+   ERR(EAI_MAX);   /*xxx*/
+ #else
ERR(EAI_BADHINTS);  /*xxx*/
+ #endif
pai->ai_protocol = IPPROTO_UDP;
break;
case SOCK_STREAM:
if (pai->ai_protocol != IPPROTO_TCP &&
pai->ai_protocol != ANY)
+ #if defined(__MVS__)
+   /* hints seem to be unknown to OS390 Open 
Edition, use 
+ EAI_MAX */
+   ERR(EAI_MAX);   /*xxx*/
+ #else
ERR(EAI_BADHINTS);  /*xxx*/
+ #endif
pai->ai_protocol = IPPROTO_TCP;
break;
default:
***
*** 350,356 
--- 374,386 
pai->ai_socktype = 

Re: rsync anyone?

2015-12-28 Thread Skeldum, William
The pax command is a good choice because it can copy all files, directories, 
and symbolic links in a directory using a single command without overlaying any 
existing files.   For example:
cd /Service/ZOS113/var
pax -rvwk -pe * /var
Bill

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Hansen, Dave L - Eagan, MN
Sent: Monday, December 28, 2015 10:58 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: rsync anyone?

Hi,  I have been working with IBM to identify how to move a USS directory that 
has files and subdirectories to a different LPAR.  They said Ported Tools and 
the scp command.  However, OpenSSH has had security issues IIRC.  The other 
thing they mentioned was to port rsync over to z/OS.  I also have directions on 
how to voice this as a requirement to USS development using the RFE process.

Q).  Does anyone have a better way to move a directory that has files and 
subdirectories to a different LPAR?  Or do you just keep installing the same 
code for each instance?

Q).  Is anyone requesting rsync for z/OS via RFE or working on a port for 
rsync?  We do not have shared DASD and need something.


  Thank you,  Dave

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

The information contained in this electronic communication and any document 
attached hereto or transmitted herewith is confidential and intended for the 
exclusive use of the individual or entity named above. If the reader of this 
message is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, you are hereby notified that any 
examination, use, dissemination, distribution or copying of this communication 
or any part thereof is strictly prohibited. If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this communication. Thank you.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


rsync anyone?

2015-12-28 Thread Hansen, Dave L - Eagan, MN
Hi,  I have been working with IBM to identify how to move a USS directory that 
has files and subdirectories to a different LPAR.  They said Ported Tools and 
the scp command.  However, OpenSSH has had security issues IIRC.  The other 
thing they mentioned was to port rsync over to z/OS.  I also have directions on 
how to voice this as a requirement to USS development using the RFE process.

Q).  Does anyone have a better way to move a directory that has files and 
subdirectories to a different LPAR?  Or do you just keep installing the same 
code for each instance?

Q).  Is anyone requesting rsync for z/OS via RFE or working on a port for 
rsync?  We do not have shared DASD and need something.


  Thank you,  Dave

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: OpenSSH has had bugs in the news. (Was rsync anyone?)

2015-12-28 Thread Kirk Wolf
Here's the CVE:  *CVE-2015-5600*
http://seclists.org/oss-sec/2015/q3/173

z/OS OpenSSH doesn't support keyboard-interative authentication, so this
particular brute force attack on passwords would not apply anyway.

I'll also point out a couple of things:

1) All popular security software has defects and vulnerabilities.
 OpenSSH (which does NOT use SSL/TLS) is generally much better than
alternatives like OpenSSL or other popular SSL/TLS implementations.  (e.g.
"Heartbleed", "Poodle", "FREAK", etc)

2) IBM monitors CVEs against OpenSSH and releases PTFs to address them



Kirk Wolf
Dovetailed Technologies
http://dovetail.com

On Mon, Dec 28, 2015 at 2:42 PM, Hansen, Dave L - Eagan, MN <
00d83826d62b-dmarc-requ...@listserv.ua.edu> wrote:

>
> http://arstechnica.com/security/2015/07/bug-in-widely-used-openssh-opens-servers-to-password-cracking/
>
> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of Kirk Wolf
> Sent: Monday, December 28, 2015 1:10 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: rsync anyone?
>
> >
> > ... However, OpenSSH has had security issues IIRC. ...
>
>
> What security issues are those?
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions, send email
> to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: rsync anyone?

2015-12-28 Thread Paul Gilmartin
On Mon, 28 Dec 2015 14:08:37 -0600, Kirk Wolf wrote:
>
>I'm not sure if an ssh invocation of pax like this works in all cases.
>Certainly z/OS to non-z/OS it would not work since, by default, ssh exec
>sessions are translated EBCDIC/ASCII and vice versa in the z/OS OpenSSH
>implementations.   I would have to check, but this seems unlikely to be
>binary-clean zOS->zOS.   We've argued this before, right?
> 
I don't know that we have much to argue about as long as we agree that EBCDIC
creates problems in a predominantly ASCII world.

And in the z/OS -- non-z/OS instance, I deal with the confrontation by adding
a suitably crafted iconv in a pipe on the z/OS side.

And (only) z/OS pax has elaborate facilities for ASCII<->EBCDIC on the
directory side, but not on the archive side.

The bad news is that IBM REJected my SR when I reported that when pax
converted a file tagged IBM-1047;NL to UTF-8, it converted the NLs to LFs
but the tag became UTF-8;NL.  Should have been UTF-8;LF.

>The good news is that with this APAR:
>https://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.foto100/soc4q15.htm
>
A christmas present.  Is it under control of the individual user, or only the 
administrator:

>z/OS V2R2 OpenSSH can now customize which kinds of channels are converted,
>using the "ChannelConvert" option and omitting "exec" from the list.
>Assuming that you use portable PAX/USTART file formats, you could use this
>to send filesystems z/OS<->non-z/OS.
> 
"exec"?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


AW: rsync anyone?

2015-12-28 Thread Michael Knigge
Dave,

a long time ago I looked at the source code of rsync and it is no trivial task 
to port it to an ebcdic platform (at least it was). A colleague of me was so 
frustrated too that he wrote a command line tool and a daemon that can be used 
to sync directories using the "rsync algorithm", but uses an own protocol.

https://github.com/tobiasbaum/jsync

Maybe you want to throw an eye on it.


Bye,
Michael



Mit freundlichen Grüßen

Michael Knigge
Software Engineer

SET GmbH
Lister Straße 15
30163 Hannover

phone: +49 511 39780-23
fax: +49 511 39780-65

www.set.de
michael.kni...@set.de

Handelsregister: HRB52778 Amtsgericht Hannover
Geschäftsführer: Till Dammermann, Dr. Bernd Huber

Weitere Informationen finden Sie auf unserer Homepage...

-Ursprüngliche Nachricht-
Von: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] Im Auftrag 
von Hansen, Dave L - Eagan, MN
Gesendet: Montag, 28. Dezember 2015 18:58
An: IBM-MAIN@LISTSERV.UA.EDU
Betreff: rsync anyone?

Hi,  I have been working with IBM to identify how to move a USS directory that 
has files and subdirectories to a different LPAR.  They said Ported Tools and 
the scp command.  However, OpenSSH has had security issues IIRC.  The other 
thing they mentioned was to port rsync over to z/OS.  I also have directions on 
how to voice this as a requirement to USS development using the RFE process.

Q).  Does anyone have a better way to move a directory that has files and 
subdirectories to a different LPAR?  Or do you just keep installing the same 
code for each instance?

Q).  Is anyone requesting rsync for z/OS via RFE or working on a port for 
rsync?  We do not have shared DASD and need something.


  Thank you,  Dave

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


OpenSSH has had bugs in the news. (Was rsync anyone?)

2015-12-28 Thread Hansen, Dave L - Eagan, MN
http://arstechnica.com/security/2015/07/bug-in-widely-used-openssh-opens-servers-to-password-cracking/

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Kirk Wolf
Sent: Monday, December 28, 2015 1:10 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: rsync anyone?

>
> ... However, OpenSSH has had security issues IIRC. ...


What security issues are those?

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: rsync anyone?

2015-12-28 Thread Paul Gilmartin
On Mon, 28 Dec 2015 18:12:05 +, Skeldum, William wrote:

>The pax command is a good choice because it can copy all files, directories, 
>and symbolic links in a directory using a single command without overlaying 
>any existing files.   For example:
>cd /Service/ZOS113/var
>pax -rvwk -pe * /var
> 
For rsync-like behavior, one often wants to overwrite older files and preserve 
newer.
For this, "-u" may be a better choice than "-k".

... and your command moves files only within an LPAR.  Across LPARs,
you need something such as:

ssh other-LPAR "pax -w bin" |  # (Yes, the dreaded "ssh".)
pax -rvu

-- gil



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: rsync anyone?

2015-12-28 Thread Skeldum, William
Gil,
Thanks for the correction.  I was thinking if he was doing a one-time move he 
could mount a filesystem on the originating LPAR, do the pax command, dismount, 
and then mount again on the receiving LPAR.  Cumbersome, but works for a one 
time move.
If it is going to be an ongoing process then I'm sure Dave would desire a 
better solution.
Bill

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Monday, December 28, 2015 12:35 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: rsync anyone?

On Mon, 28 Dec 2015 18:12:05 +, Skeldum, William wrote:

>The pax command is a good choice because it can copy all files, directories, 
>and symbolic links in a directory using a single command without overlaying 
>any existing files.   For example:
>cd /Service/ZOS113/var
>pax -rvwk -pe * /var
>
For rsync-like behavior, one often wants to overwrite older files and preserve 
newer.
For this, "-u" may be a better choice than "-k".

... and your command moves files only within an LPAR.  Across LPARs, you need 
something such as:

ssh other-LPAR "pax -w bin" |  # (Yes, the dreaded "ssh".)
pax -rvu

-- gil



--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

The information contained in this electronic communication and any document 
attached hereto or transmitted herewith is confidential and intended for the 
exclusive use of the individual or entity named above. If the reader of this 
message is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, you are hereby notified that any 
examination, use, dissemination, distribution or copying of this communication 
or any part thereof is strictly prohibited. If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this communication. Thank you.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: rsync anyone?

2015-12-28 Thread Kirk Wolf
>
> ... However, OpenSSH has had security issues IIRC. ...


What security issues are those?

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN