[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Foosh (FuShell)



.... merci!
je pensais pas ke t'allais développer le patch!
bon, je présume que ton patch est un beer-ware?
c-a-d, puisque je l'utilise, quand je te vois, je
serai obliger de t'inviter à une bière!

encore merci!

--- Jean-Damien Durand <Jean-Damien.Durand@cern.ch> a
écrit :

> C'est du code bsd, ne passe pas du tout sur
> GNU/Linux.
> Bon je t'ai fait le patch qui rend la version 0-9-0
> compilable sur notre OS favori,
> c.f. attachment.
> 
> Ensuite en tant que root:
> cd fush-0-9-0
> patch -p1 < la_ou_est_fush-0-9-0.patch
> patching file src/fuparse.c
> patching file src/fushadmin.c
> patching file src/fushtools.c
> ./configure
> make
> mkdir -p /usr/local/etc/fush/
> make install
> make config
> 
> C'est installe dans /usr/local par default, et... ca
> a l'air de marcher.
> Je te laisse l'installer ailleurs si tu veux. Note
> que le make install n'a
> pas de mkdir pour la db de fush.
> 
> Sinon, example ou j'ai skippe /sbin des directories
> que le shell a le droit
> d'executer:
> 
> % fush -c /sbin/ifconfig
> function [exec /sbin/ifconfig] violates system
> policy.
> 
> 1ere fois que je l'utilise et meme que j'en entends
> parler... mes indications sont sans guarantie,
> of course.
> 
> A+, JD.
> 
> On Monday 27 June 2005 14:47, Jay Ar wrote:
> JA > Bonjour,
> JA > 
> JA > j'essaie d'installer le shell Fush
> JA > (http://foosh.sourceforge.net/ ) sur ma debian
> sarge.
> JA > 
> JA > mais voilà, mon make install ne trouve pas un
> certain
> JA > libutil.h ..
> JA > quelqu'un aurait une idée dans quel paquet je
> pourrais
> JA > trouver ce libutil.h?
> JA > ou encore mieux, quelqu'un aurait-il un miroir
> qui
> JA > contiendrait le paquet debian foosh (ou fush)?
> JA > 
> JA > merci!
> JA > 
> JA > Jay Ar
> JA > 
> JA > 
> JA > 	
> JA > 
> JA > 	
> JA > 		
> JA >
>
___________________________________________________________________________
> 
> JA > Appel audio GRATUIT partout dans le monde avec
> le nouveau Yahoo! Messenger 
> JA > Téléchargez cette version sur
> http://fr.messenger.yahoo.com
> JA > 
> JA > 
> 
> -- 
> Jean-Damien Durand CERN/IT/FIO/DS - Geneva,
> Switzerland
> PGP: http://home.cern.ch/~jdurand/public_key.asc
> CERN CA:
> http://cern.ch/service-grid-ca/crt/root_crt.html
> WWW: http://home.cern.ch/~jdurand
> > diff -Naur fush-0-9-0.orig/src/fuparse.c
> fush-0-9-0/src/fuparse.c
> --- fush-0-9-0.orig/src/fuparse.c	2004-01-26
> 01:52:01.000000000 +0100
> +++ fush-0-9-0/src/fuparse.c	2005-06-27
> 15:56:50.000000000 +0200
> @@ -22,10 +22,22 @@
>  #include "linklist.h"
>  #include "md5.h"
>  
> +#include <sys/types.h>
> +#include <pwd.h>
> +
>  extern List g_alias;
>  extern List g_conf;
>  extern List g_seconf;
>  
> +char *mygetlogin() {
> +  struct passwd *passwd = getpwuid(geteuid());
> +  if (! passwd) {
> +    return NULL;
> +  }
> +  return(passwd->pw_name);
> +
> +}
> +
>  /* Sat Nov 29 10:56:24 PST 2003
>   * get a list of tokens, and expand variables and
> aliases */
>  int fu_expand( char* tokens, int num_tokens ) {
> @@ -455,8 +467,8 @@
>      hostname = fullname;
>  
>    /* get the username */
> -  if ( !( username = getlogin( ) ) )
> -    die( "getlogin()" );
> +  if ( !( username = mygetlogin( ) ) )
> +    die( "mygetlogin()" );
>  
>    /* get the cwd */
>  
> diff -Naur fush-0-9-0.orig/src/fushadmin.c
> fush-0-9-0/src/fushadmin.c
> --- fush-0-9-0.orig/src/fushadmin.c	2004-01-26
> 01:52:01.000000000 +0100
> +++ fush-0-9-0/src/fushadmin.c	2005-06-27
> 15:56:42.000000000 +0200
> @@ -26,6 +26,7 @@
>  #endif
>  #include "fush.h"
>  #include <signal.h>
> +#include <sys/types.h>
>  #include <pwd.h>
>  #include <dirent.h>
>  #include <ctype.h>
> @@ -44,6 +45,15 @@
>  regex_t r_python;
>  regex_t r_emacs;
>  
> +char *mygetlogin() {
> +  struct passwd *passwd = getpwuid(geteuid());
> +  if (! passwd) {
> +    return NULL;
> +  }
> +  return(passwd->pw_name);
> +
> +}
> +
>  /* Sat Nov  8 14:24:53 PST 2003
>   * Foneyop
>   * read the command in from stdin */
> @@ -321,8 +331,8 @@
>    //bzero( digest, 17 );
>  
>    /* open a connection to syslog */
> -  if ( !( username = getlogin( ) ) )
> -    die( "getlogin()" );
> +  if ( !( username = mygetlogin( ) ) )
> +    die( "mygetlogin()" );
>  
>    openlog( username, LOG_NDELAY | LOG_PID,
> LOG_LOCAL0 );
>  
> diff -Naur fush-0-9-0.orig/src/fushtools.c
> fush-0-9-0/src/fushtools.c
> --- fush-0-9-0.orig/src/fushtools.c	2004-01-26
> 01:52:01.000000000 +0100
> +++ fush-0-9-0/src/fushtools.c	2005-06-27
> 15:56:38.000000000 +0200
> @@ -23,7 +23,12 @@
>  #include "linklist.h"
>  #include "md5.h"
>  #include <pwd.h>
> -#include <libutil.h>
> +/* #include <libutil.h> */
> +#ifndef netbsd
> +#define user_from_uid(a,b) getpwuid(a) ?
> getpwuid(a)->pw_name : NULL
> +#define group_from_gid(a,b) getgrgid(a) ?
> getgrgid(a)->gr_name : NULL
> +#endif
> +
>  #include <termios.h>
>  
>  extern List g_replace;
> 



	
	
		
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com



Reply to: