Re: cp error message "Invalid character in program"
jared r r spiegel wrote: $ cp file file.bak as far as 'wtf is going on with cp(1)', maybe would've hinted at "you are executing something other than /bin/cp" earlier in the game. Wasn't executing something other than. Was getting NLS error messages for OBSD commands from the Object Rexx message file. Very silly. Working too hard, starting to ask foolish questions on the list! My apologies. -- Jack J. Woehr# "Self-delusion is http://www.well.com/~jax # half the battle!" http://www.softwoehr.com # - Zippy the Pinhead
Re: cp error message "Invalid character in program"
On Sat, Oct 04, 2008 at 03:44:37PM -0600, Jack Woehr wrote: > Philip Guenther wrote: >> What's the output of >> ktrace rm ccreply.rex >> kdump | egrep -A1 -B2 'execv|errno' >> > You answered it. > > Look here: > > 16524 rm CALL open(0xcfbd1e60,0,0) > 16524 rm NAMI "/opt/ooRexx/bin/rexx.cat" > > Hmm ... might've saved you time by trying literally $ /bin/cp file file.bak after having received the 'Invalid character in program' message when doing $ cp file file.bak as far as 'wtf is going on with cp(1)', maybe would've hinted at "you are executing something other than /bin/cp" earlier in the game. -- jared
Re: cp error message "Invalid character in program"
Philip Guenther wrote: What's the output of ktrace rm ccreply.rex kdump | egrep -A1 -B2 'execv|errno' You answered it. Look here: 16524 rm CALL open(0xcfbd1e60,0,0) 16524 rm NAMI "/opt/ooRexx/bin/rexx.cat" Hmm ... $ set | grep NLSPATH NLSPATH=/opt/ooRexx/bin/rexx.cat: Oops. Changed NLSPATH to accomodate Rexx. So now my error messages come from Rexx's error msg file. *{{Whack}}* Between trying to make OORexx and BSF4Rexx work on OpenBSD so I can stop booting OpenSolaris to do Rexx/Java development on my PigIron project, I think I'm losing my mind. Thanks for all the help! -- Jack J. Woehr# "Self-delusion is http://www.well.com/~jax # half the battle!" http://www.softwoehr.com # - Zippy the Pinhead
Re: cp error message "Invalid character in program"
On 2008-10-04, Jack Woehr <[EMAIL PROTECTED]> wrote: > Philip Guenther wrote: >> Hmm, I don't see that error message in the stock /bin/cp or /bin/rm. >> Are you running your own version of them or have shell script wrappers >> for them or something? What's the output of "which cp rm"? >> > > Is it maybe builtin to ksh? Besides, the error message is probably from > a runtime lib, right? "Invalid character in program" looks likely to be a REXX error message.. > Anway: > > $ echo $SHELL > /bin/ksh > $ which rm > /bin/rm > $ ls -l ccreply.rex > -rwxr-xr-x 1 root wheel 4674 Oct 3 12:11 ccreply.rex > $ whoami > jax > $ rm ccreply.rex > override rwxr-xr-x root/wheel for ccreply.rex? y > rm: ccreply.rex: Invalid character in program > $ uname -a > OpenBSD elephant.jaxrcfb 4.3 4.3#0 i386
Re: cp error message "Invalid character in program"
On Sat, Oct 4, 2008 at 2:09 PM, Jack Woehr <[EMAIL PROTECTED]> wrote: > It's 4.3 release but I did rebuild from freshly checked out source. Oh well, then the md5s wouldn't be expected to match. What's the output of ktrace rm ccreply.rex kdump | egrep -A1 -B2 'execv|errno' Philip Guenther
Re: cp error message "Invalid character in program"
Philip Guenther wrote: Perhaps, but /bin/rm and /bin/cp are staticly linked, so the message would appear in the binary in some form. strings /bin /rm doesn't show that string. Anway: $ echo $SHELL /bin/ksh $ which rm /bin/rm $ ls -l ccreply.rex -rwxr-xr-x 1 root wheel 4674 Oct 3 12:11 ccreply.rex I presume your current directory is owned by root and not writable by you. Yes. Since you're using ksh, try "whence -v cp rm". $ whence -v rm cp rm is a tracked alias for /bin/rm cp is a tracked alias for /bin/cp -- Jack J. Woehr# "Self-delusion is http://www.well.com/~jax # half the battle!" http://www.softwoehr.com # - Zippy the Pinhead
Re: cp error message "Invalid character in program"
Paul de Weerd wrote: Also compare the md5 sum of your /bin/rm with the sum from a clean install of 4.3 (assuming this is a -RELEASE version you're running). It's 4.3 release but I did rebuild from freshly checked out source. Both the release and the checkout came from ftp3.usa.openbsd.org So did my Sparc64 install and it does not exhibit this behavior. I have built a lot of ports. Full jdk6, full kde, etc. I wonder if I'm hacked. $ ls -l /bin/rm -r-xr-xr-x 1 root bin 174016 Aug 23 16:03 /bin/rm $ md5 /bin/rm MD5 (/bin/rm) = 9c46f6ee1c8234e3469ea2d461536c17 -- Jack J. Woehr# "Self-delusion is http://www.well.com/~jax # half the battle!" http://www.softwoehr.com # - Zippy the Pinhead
Re: cp error message "Invalid character in program"
On Sat, Oct 4, 2008 at 1:39 PM, Jack Woehr <[EMAIL PROTECTED]> wrote: > Is it maybe builtin to ksh? ksh doesn't have builtins for cp or rm. > Besides, the error message is probably from a runtime lib, right? Perhaps, but /bin/rm and /bin/cp are staticly linked, so the message would appear in the binary in some form. > Anway: > > $ echo $SHELL > /bin/ksh > $ which rm > /bin/rm > $ ls -l ccreply.rex > -rwxr-xr-x 1 root wheel 4674 Oct 3 12:11 ccreply.rex I presume your current directory is owned by root and not writable by you. > $ whoami > jax > $ rm ccreply.rex > override rwxr-xr-x root/wheel for ccreply.rex? y > rm: ccreply.rex: Invalid character in program Since you're using ksh, try "whence -v cp rm". Philip Guenther
Re: cp error message "Invalid character in program"
On Sat, Oct 04, 2008 at 02:39:16PM -0600, Jack Woehr wrote: > Philip Guenther wrote: >> Hmm, I don't see that error message in the stock /bin/cp or /bin/rm. >> Are you running your own version of them or have shell script wrappers >> for them or something? What's the output of "which cp rm"? >> > > Is it maybe builtin to ksh? Besides, the error message is probably from > a runtime lib, right? > Anway: Try `type rm` (is it not an alias to /usr/local/bin/gnu-rm or something like that ?) and `strings $(which rm)` (does the binary contain this 'Invalid character in program' string ?). Also compare the md5 sum of your /bin/rm with the sum from a clean install of 4.3 (assuming this is a -RELEASE version you're running). >$ echo $SHELL >/bin/ksh >$ which rm >/bin/rm >$ ls -l ccreply.rex >-rwxr-xr-x 1 root wheel 4674 Oct 3 12:11 ccreply.rex >$ whoami >jax >$ rm ccreply.rex >override rwxr-xr-x root/wheel for ccreply.rex? y >rm: ccreply.rex: Invalid character in program >$ uname -a >OpenBSD elephant.jaxrcfb 4.3 4.3#0 i386 I, for one, have never seen that error before ;) Cheers, Paul 'WEiRD' de Weerd -- >[<++>-]<+++.>+++[<-->-]<.>+++[<+ +++>-]<.>++[<>-]<+.--.[-] http://www.weirdnet.nl/
Re: cp error message "Invalid character in program"
Philip Guenther wrote: Hmm, I don't see that error message in the stock /bin/cp or /bin/rm. Are you running your own version of them or have shell script wrappers for them or something? What's the output of "which cp rm"? Is it maybe builtin to ksh? Besides, the error message is probably from a runtime lib, right? Anway: $ echo $SHELL /bin/ksh $ which rm /bin/rm $ ls -l ccreply.rex -rwxr-xr-x 1 root wheel 4674 Oct 3 12:11 ccreply.rex $ whoami jax $ rm ccreply.rex override rwxr-xr-x root/wheel for ccreply.rex? y rm: ccreply.rex: Invalid character in program $ uname -a OpenBSD elephant.jaxrcfb 4.3 4.3#0 i386 -- Jack J. Woehr# "Self-delusion is http://www.well.com/~jax # half the battle!" http://www.softwoehr.com # - Zippy the Pinhead
Re: cp error message "Invalid character in program"
On Sat, Oct 4, 2008 at 12:36 PM, Jack Woehr <[EMAIL PROTECTED]> wrote: > In the following example, I'm trying to copy a file (wrongly) > in a directory I don't own and which is write-protected: > > cp factor.rex factor.rex.bak > cp: factor.rex.bak: Invalid character in program > > "Invalid character in program"?? > > rm also returns this when I use rm illegally. Was it always > like this? Hmm, I don't see that error message in the stock /bin/cp or /bin/rm. Are you running your own version of them or have shell script wrappers for them or something? What's the output of "which cp rm"? Philip Guenther