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

[E-devel] Fwd: [Fwd: New entranced problems 9/13/06]



FYI

---------- Forwarded message ----------
From: Gregory Kriehn <gkriehn@csufresno.edu>
Date: Oct 5, 2006 6:01 PM
Subject: [Fwd: New entranced problems 9/13/06]
To: Didier Casse <didier.casse@gmail.com>


Didier,

Could you get this posted to the enlightenment-devel list?  The csh/tcsh
login bug has popped up again after the rasterman pushed for code
cleanup in entrance (see
http://sourceforge.net/mailarchive/forum.php?thread_id=30631844&forum_id=6427
) for details.

I'd like for the bug to get fixed again.

Thanks!
Greg



---------- Forwarded message ----------
From: Gregory Kriehn <gkriehn@csufresno.edu>
To: enlightenment-devel-admin@lists.sourceforge.net
Date: Fri, 29 Sep 2006 11:11:37 -0700
Subject: New entranced problems 9/13/06
Please note that in the recent code cleanup of entrance, you are no
longer allowing people (again) to login to enlightenment from either csh
or tcsh shells.  The reason why the code was kind of cludgy was to get
around this problem---see the recent exchange between Phuah and myself
concerning this.  The bug was originally fixed around August, but crept
back into entrance a couple of weeks ago.

Could someone please submit the following patch and commit it to cvs for
entrance?

Thanks!
Greg



---------- Forwarded message ----------
From: Phuah Yee Keat <yk.phuah@nestac.com>
To: Gregory Kriehn <gkriehn@csufresno.edu>
Date: Fri, 29 Sep 2006 18:39:51 +0800
Subject: Re: New entranced problems 9/13/06
Hi Greg,

I seems to have problems committing to the entrance cvs, so I have
attached a cvs diff here for you to try and commit it.

Cheers,
Phuah Yee Keat

Gregory Kriehn wrote:
Phuah,

It looks like your highlight of the problem has not been folded into the
most recent commits of entrance yet.  Is it possible for you to bump
this back up?

I have confirmed, once again, that it is indeed tcsh/csh causing the
problem.

Thanks!
Greg

On Fri, 2006-09-15 at 10:15 +0800, Phuah Yee Keat wrote:
The latest entrance commit makes it incompatible with tcsh.

I am reproducing the mail I sent to the list below:

-------------------
Hi,

Sorry that this came in late. The latest entrance patch have some problems

---------------------
revision 1.86
date: 2006/08/31 14:37:37;  author: essiene;  state: Exp;  lines: +73 -24
- Commit Entrance shell utilization patches from Eugen Minciu... they
work like a charm  :)
- Update TODO
---------------------

There IS a reason for using /bin/sh and not the user's shell, and that
explains the mess at that part of the code. Check the following commit.

---------------------
revision 1.80
date: 2005/12/10 05:55:09;  author: xcomputerman;  state: Exp;  lines: +1 -1
I thought I had committed this...
Force usage of /bin/sh to execute session to avoid problems with csh users.
---------------------

The exact Reason can be seen from the tcsh man page

----------------
    -l  The shell is a login shell.  Applicable only if -l is the only
flag specified.
----------------

So there you go, you can't do csh -l -c xxx, it won't work, and the
latest commit will give problems to users with their default shell set
to csh.

Cheers,
Phuah Yee Keat



? entrance_session.cvsdiff
Index: entrance_session.c
===================================================================
RCS file: /var/cvs/e/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.89
diff -r1.89 entrance_session.c
843,844c843
<    } else {
<          res = execl("/bin/sh", "/bin/sh", "-l", "-c", buf, NULL);
---
   }
846,853c845,847
<          /* Getting here means the previous didn't work
<               * If /bin/sh isn't a login shell run /bin/sh without
loading the profile
<               * Also log a warning because this will probably not
behave correctly */
<          if (res == -1) {
<                 /*TODO: should actually hit the user in the face
with this message*/
<                 syslog(LOG_NOTICE, "Neither '%s' or '/bin/sh' are
working login shells for user '%s'. Your session may not function
properly. ",shell,user);
<                 execl("/bin/sh", "/bin/sh", "-c", buf, NULL);
<          }
---
   /* For csh, the above will fail, because csh does not like '-l -c cmd'
    * fallback to using default shell */
   res = execl("/bin/sh", "/bin/sh", "-l", "-c", buf, NULL);
855,858c849,855
<          /* Damn, that didn't work either.
<               * Bye! We call it quits and log an error
<               * TODO: Also hit the user in the face with this! (ouch!)*/
<               syslog(LOG_CRIT, "Entrance could not find a working
shell to start the session for user: \"%s\".",user);
---
   /* Getting here means the previous didn't work
      * If /bin/sh isn't a login shell run /bin/sh without loading the profile
      * Also log a warning because this will probably not behave correctly */
   if (res == -1) {
        /*TODO: should actually hit the user in the face with this message*/
        syslog(LOG_NOTICE, "Neither '%s' or '/bin/sh' are working login shells for user '%s'. Your session may not function properly. ",shell,user);
        execl("/bin/sh", "/bin/sh", "-c", buf, NULL);
859a857,861

   /* Damn, that didn't work either.
      * Bye! We call it quits and log an error
      * TODO: Also hit the user in the face with this! (ouch!)*/
      syslog(LOG_CRIT, "Entrance could not find a working shell to start the session for user: \"%s\".",user);
? entrance_session.cvsdiff
Index: entrance_session.c
===================================================================
RCS file: /var/cvs/e/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.89
diff -r1.89 entrance_session.c
843,844c843
<    } else {
< 	   res = execl("/bin/sh", "/bin/sh", "-l", "-c", buf, NULL);
---
>    }
846,853c845,847
< 	   /* Getting here means the previous didn't work 
< 	   	* If /bin/sh isn't a login shell run /bin/sh without loading the profile
< 		* Also log a warning because this will probably not behave correctly */
< 	   if (res == -1) { 
< 		  /*TODO: should actually hit the user in the face with this message*/
< 		  syslog(LOG_NOTICE, "Neither '%s' or '/bin/sh' are working login shells for user '%s'. Your session may not function properly. ",shell,user);
< 		  execl("/bin/sh", "/bin/sh", "-c", buf, NULL);
< 	   }
---
>    /* For csh, the above will fail, because csh does not like '-l -c cmd'
>     * fallback to using default shell */
>    res = execl("/bin/sh", "/bin/sh", "-l", "-c", buf, NULL);
855,858c849,855
< 	   /* Damn, that didn't work either.
< 		* Bye! We call it quits and log an error 
< 		* TODO: Also hit the user in the face with this! (ouch!)*/
< 		syslog(LOG_CRIT, "Entrance could not find a working shell to start the session for user: \"%s\".",user);
---
>    /* Getting here means the previous didn't work 
>    	* If /bin/sh isn't a login shell run /bin/sh without loading the profile
> 	* Also log a warning because this will probably not behave correctly */
>    if (res == -1) { 
> 	  /*TODO: should actually hit the user in the face with this message*/
> 	  syslog(LOG_NOTICE, "Neither '%s' or '/bin/sh' are working login shells for user '%s'. Your session may not function properly. ",shell,user);
> 	  execl("/bin/sh", "/bin/sh", "-c", buf, NULL);
859a857,861
> 
>    /* Damn, that didn't work either.
> 	* Bye! We call it quits and log an error 
> 	* TODO: Also hit the user in the face with this! (ouch!)*/
> 	syslog(LOG_CRIT, "Entrance could not find a working shell to start the session for user: \"%s\".",user);