Giter VIP home page Giter VIP logo

chaos / mrsh Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 9.0 925 KB

Mrsh is a set of remote shell programs that use munge authentication rather than reserved ports for security. The code for mrsh is based on the source code for rsh, rshd, rlogin, rlogind, and rcp.

License: GNU General Public License v2.0

C 22.76% Shell 39.78% UnrealScript 0.24% Makefile 33.07% M4 3.07% Roff 1.09%

mrsh's People

Contributors

chu11 avatar e4t avatar garlick avatar grondo avatar johnwestlund avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mrsh's Issues

union wait depreciated - suggested fix attached.

The following patch should make it work:

diff --git a/mrlogin/mrlogin.c b/mrlogin/mrlogin.c
index ccde09e..00d83d9 100644
--- a/mrlogin/mrlogin.c
+++ b/mrlogin/mrlogin.c
@@ -476,7 +476,7 @@ writeroob(int ignore)
 void
 catch_child(int ignore)
 {
-       union wait status;
+       int status;
        int pid;

        (void)ignore;
@@ -487,7 +487,7 @@ catch_child(int ignore)
                        return;
                /* if the child (reader) dies, just quit */
                if (pid < 0 || (pid == childpid && !WIFSTOPPED(status)))
-                       done((int)(status.w_termsig | status.w_retcode));
+                       done((int)(WTERMSIG(status) | WEXITSTATUS(status)));
        }
        /* NOTREACHED */
 }

Authentication failure on localhost

I own two linux machines, on the first one munge and mrsh work without any issues. On the other I am able to connect to the first machine but not to localhost. On the first one connecting to localhost works. The versions of munge and mrsh are the same on both machines. I spent roughly a day trying to work this out by reading through straces of the servers and clients. I would be really happy if you had helped me resolve this issue.

Connect from Windows?

Hi,

I need to connect to a server running mrsh from a Windows machine. Considering the client on the Windows side have to have the same munge key, is there any software that can do that?

Can't find libncurses on SLES12

Trying to build on SLES12 and configure can't find libncurses, relevant test output:

jawestlu@master3-sles12:~> gcc -o conftest -g -O2 /tmp/conftest.c -lncurses
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lncurses
collect2: error: ld returned 1 exit status

Trying to build the following:

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "mrsh"
#define VERSION "2.6"
#define RELEASE "6"
#define PACKAGE "mrsh"
#define VERSION "2.6"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define STDC_HEADERS 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_UNISTD_H 1
#define HAVE_GETOPT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_MALLOC 1
#define HAVE_STRCMP 1
#define HAVE_STRLEN 1
#define HAVE_STRCPY 1
#define HAVE_STRCHR 1
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char endwin ();
int
main ()
{
return endwin ();
  ;
  return 0;
}

SLES appears to put things in the same place as TOSS/RHEL:

jawestlu@master3-sles12:/etc> rpm -qa | grep ncurses
libncurses5-5.9-40.124.x86_64
ncurses-utils-5.9-40.124.x86_64
libncurses6-5.9-40.124.x86_64
jawestlu@master3-sles12:/etc> rpm -ql libncurses5
/lib64/libncurses.so.5
/lib64/libncurses.so.5.9
/lib64/libncursesw.so.5
/lib64/libncursesw.so.5.9
/lib64/libtinfo.so.5
/lib64/libtinfo.so.5.9
/usr/lib64/libform.so.5
/usr/lib64/libform.so.5.9
/usr/lib64/libformw.so.5
/usr/lib64/libformw.so.5.9
/usr/lib64/libmenu.so.5
/usr/lib64/libmenu.so.5.9
/usr/lib64/libmenuw.so.5
/usr/lib64/libmenuw.so.5.9
/usr/lib64/libncurses++.so.5
/usr/lib64/libncurses++.so.5.9
/usr/lib64/libncurses++w.so.5
/usr/lib64/libncurses++w.so.5.9
/usr/lib64/libpanel.so.5
/usr/lib64/libpanel.so.5.9
/usr/lib64/libpanelw.so.5
/usr/lib64/libpanelw.so.5.9
/usr/lib64/libtic.so.5
/usr/lib64/libtic.so.5.9

The issue has to due with there not being a bare libncurses.so. Creating a symlink of SLES works around the issue:

master3-sles12:/lib64 # ln -s libncurses.so.5 libncurses.so
jawestlu@master3-sles12:~> gcc -o conftest -g -O2 /tmp/conftest.c -lncurses
jawestlu@master3-sles12:~>

Why on TOSS ld finds /lib64/libncurses.so.5 but on SLES? Googling for 'ld' and 'so' is unfortunately difficult.

can we warn people off using this?

Problem: as evidenced by the interaction in #17, mrsh might be considered an attractive nuisance at this point. Nobody should really use it.

Could we replace the README.md with a giant warning and set the repo to read-only?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.