On Fri, 15 Jan 1999, Randolph J. Herber wrote:
> This is the second time that this discussion has come up in the last
> several months. Unfortunately, I can not seem to get the ssh ``support
> group'' (I regret that I do not know the proper name for the group) to
> listen to me---they seem to have the idea that the code has to reconstruct
> the system default project even in the face of an sshd that the system
> adminstrator started in a non system standard (whatever that maybe)
> project group. Did they not consider that may be what the system
> administration wanted to have happen---users whom do not have entries
> in the /etc/project file to have a project code different from the
> system default project code?
>
> The SGI code places a login which does not have an entry in /etc/project
> into the same system project code as the project code that the sshd is
> running under which would be the system default project unless the
> system administration went to some effort to cause it to be different.
>
> That fix is quite simple:
>
> 1) Remove that entire subroutine.
No need to do this.
> 2) Replace the call to the subroutine with:
>
> newarraysess();
> setprid(getdfltprojuser(u_name));
For the xxx time here is the patch.
------------------------------ CUT HERE --------------------------------
This patch works with ssh-1.2.26.
Installing the patch is simple. Go to the sources directory
(~/src/ssh-1.2.26/ , or whatever) and give this command
% patch < ~/patches/patch-ssh-1.2.26.irix
(the filename depends on where you save it, and with what name)
Then run configure, make and make install as usual. Restart any
sshd-daemons currently running.
Common subdirectories: ssh-1.2.26/gmp-2.0.2-ssh-2 and ssh-1.2.26.1/gmp-2.0.2-ssh-2
diff -u ssh-1.2.26/sshd.c ssh-1.2.26.1/sshd.c
--- ssh-1.2.26/sshd.c Wed Jul 8 18:40:38 1998
+++ ssh-1.2.26.1/sshd.c Fri Jan 15 00:21:22 1999
@@ -3673,17 +3673,8 @@
*/
int sgi_project_setup(char *username)
{
- int err;
- int naccts;
- projid_t pbuf;
+ int err = 0;
- /* Find default project for a particular user */
- if ((naccts = getprojuser(username, &pbuf, 1)) < 0)
- {
- debug("System call getprojuser failed");
- return(-1);
- }
-
/* Create a new array session and moves the current
process from its original array session to the new one. */
if (newarraysess() < 0)
@@ -3694,8 +3685,7 @@
/* Change the project ID for the array session. */
/* Must be changed after the new array session has been created. */
- if (naccts)
- err = setprid(pbuf.proj_id);
+ err = setprid(getdfltprojuser(username));
if (err != 0)
{
Common subdirectories: ssh-1.2.26/zlib-1.0.4 and ssh-1.2.26.1/zlib-1.0.4
------------------------------ CUT HERE --------------------------------
> I assure you that is the way the the SGI login programs
> do this operation. This works because of how setprid
> handles the error code returned by getdfltprojuser
> when the user is not found in the /etc/project file.
>
> The second choice is to properly administer the system and assure that
> _all_ users have entries in the /etc/project file. This method was
> posted very recently by Ryan Davis <[EMAIL PROTECTED]>.
This should not be needed. SGI rsh dos not need it.
> Randolph J. Herber, [EMAIL PROTECTED], +1 630 840 2966, CD/CDFTF PK-149F,
> Mail Stop 318, Fermilab, Kirk & Pine Rds., PO Box 500, Batavia, IL 60510-0500,
> USA. (Speaking for myself and not for US, US DOE, FNAL nor URA.) (Product,
> trade, or service marks herein belong to their respective owners.)
Regards
- eivind
--
Phone: +47 555 84163 | Para//ab, Dept. of Informatics
Fax: +47 555 84199 | University of Bergen
E-mail: [EMAIL PROTECTED] | Thormoehlens gate 55
[EMAIL PROTECTED] | N-5020 Bergen, NORWAY
Common subdirectories: ssh-1.2.26/gmp-2.0.2-ssh-2 and ssh-1.2.26.1/gmp-2.0.2-ssh-2
diff -u ssh-1.2.26/sshd.c ssh-1.2.26.1/sshd.c
--- ssh-1.2.26/sshd.c Wed Jul 8 18:40:38 1998
+++ ssh-1.2.26.1/sshd.c Fri Jan 15 00:21:22 1999
@@ -3673,17 +3673,8 @@
*/
int sgi_project_setup(char *username)
{
- int err;
- int naccts;
- projid_t pbuf;
+ int err = 0;
- /* Find default project for a particular user */
- if ((naccts = getprojuser(username, &pbuf, 1)) < 0)
- {
- debug("System call getprojuser failed");
- return(-1);
- }
-
/* Create a new array session and moves the current
process from its original array session to the new one. */
if (newarraysess() < 0)
@@ -3694,8 +3685,7 @@
/* Change the project ID for the array session. */
/* Must be changed after the new array session has been created. */
- if (naccts)
- err = setprid(pbuf.proj_id);
+ err = setprid(getdfltprojuser(username));
if (err != 0)
{
Common subdirectories: ssh-1.2.26/zlib-1.0.4 and ssh-1.2.26.1/zlib-1.0.4