Linux-Misc Digest #62, Volume #21 Sat, 17 Jul 99 16:13:10 EDT
Contents:
Re: mt-st and DLT4000 tape drive (-ljl-)
Re: chroot-performing sshd? (Birger Toedtmann)
Re: Problem booting - Redhat (Frank Sweetser)
Re: Did you switch from Windows to Linux? (Glenn Wittrock)
Re: Lynx for cron-jobs (John Thompson)
Re: newbie: 'ls' scrolls past top of screen (Glenn Wittrock)
Re: internal modem for Toshiba 7020CT (Glitch)
RH6.0 at Boot. Unable to handle kernel paging request at virtual address 076a9
(Ivey Cole)
Legator Networker: Installation problem, libncurses.so.3.0 (Kor Kiley)
Re: Linux driver for 3Com NIC: (Vidar Andresen)
Re: Solving the 1024 cylinder LILO problem (Johan Kullstam)
Re: Help please - want to limit size of user's e-mail on sendmail. (Johan Kullstam)
spontaneous reboots in RH 5.2 ("Ryan Pearman")
Re: chroot-performing sshd? (Birger Toedtmann)
Re: Segmentation fault (robert1930)
----------------------------------------------------------------------------
From: -ljl- <[EMAIL PROTECTED]>
Subject: Re: mt-st and DLT4000 tape drive
Date: Sat, 17 Jul 1999 16:20:15 GMT
In article <7mpvjr$bf1$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Thanks for the hints, but still no joy.
> 1) The PowerStor L200 does not have a button to change the density
> 2) setdensity does not seems to change the density of the tape (or, at
> least, mt status reports the same value before and after the
setdensity
> command)
> 3) mt status reports density code 0xf0 (unknown), and I am able to
write
> only 20 GB.
> 4) When I was able to write 35 GB the density code was 0x1a.
>
> I will do more testing, but if you have any other ideas I would be
happy
> to hear from you.
With Kai's "mt-st" package there is a utility program "stinit".
It resides in "/etc" on my installation. Also, you can turn
DEBUG on in "/usr/src/drivers/scsi/st.c", see the comment therein.
This reports a lot of stuff that might help resolve your problem.
There's documentation, "/usr/src/linux/Documentation/README.st",
as well some in the "mt-st" package, I think.
--
Louis-ljl-{ Louis J. LaBash, Jr. }
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
From: Birger Toedtmann <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.security,comp.security.unix
Subject: Re: chroot-performing sshd?
Date: Sat, 17 Jul 1999 17:42:56 +0200
Fixing error on chdir within sandbox:
========
diff -u ssh-1.2.27chroot/sshd.c ssh-1.2.27chroot-p2/sshd.c
--- ssh-1.2.27chroot/sshd.c Sat Jul 17 17:36:39 1999
+++ ssh-1.2.27chroot-p2/sshd.c Sat Jul 17 17:37:37 1999
fprintf(stderr, "Could not chdir to home directory %s: %s\n",
user_dir, strerror(errno));
}
+ else {
+ if (chdir("/") < 0)
+ fprintf(stderr, "Could not chdir to root of chroot directory %s: \%s\n",
+ user_dir, strerror(errno));
+ }
}
/* If debugging, dump the environment to stderr. */
if (debug_flag)
{
@@ -4348,8 +4353,8 @@
fprintf(stderr, " %.200s\n", env[i]);
fprintf(stderr, "\n");
}
=======
Birger
--
Birger T�dtmann. Bielefeld, Germany.
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | \dc
00 83 E2 57 EC 60 0B 1C D3 18 AE 2A 40 55 81 22
------------------------------
From: Frank Sweetser <[EMAIL PROTECTED]>
Subject: Re: Problem booting - Redhat
Date: 17 Jul 1999 12:22:45 -0400
"Vijay Mayadas" <[EMAIL PROTECTED]> writes:
> I had to shutdown down my Redhat 6.0 system (running on a Dell poweredge
> 1300) and bypass the usual shutdown -h command.
> When I rebooted the system, it came up with:
>
> /dev/sda9: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY...
>
> It dropped me into the shell and I typed 'fsck'. Nothing happened except the
> version of fsck was displayed.
>
> How am I supposed to run fsck?
you must pass it the device to run on as an argument, ie,
fsck /dev/sda9
--
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net | PGP key available
paramount.ind.wpi.edu RedHat 5.2 kernel 2.2.5 i586 | at public servers
You have to stay in shape. My grandmother, she started walking five miles
a day when she was 60. She's 97 today and we don't know where the hell she
is. --Ellen DeGeneris
------------------------------
Date: Sat, 17 Jul 1999 09:50:57 -0700
From: Glenn Wittrock <[EMAIL PROTECTED]>
Subject: Re: Did you switch from Windows to Linux?
Holy Cow wrote:
> coffee wrote:
> > Its fast and reliable not like windoze that crashes all the
> > time.
> Oh, come on. It don't crash "all the time." It may crash, but not nearly
> as often as one would think after perusing this ng.
That quite probably depends on how intensely your app's work the system.
Specifically I found things like photoshop to bring the crash potential to
a very high level. This could conceivably be mirrored by the gimp under
linux except with linux you can fix things. Specifically I have seen grafix
processes turn into forever loops that burn processor time, cache, etc and
continue to exist after the parent image has been killed. Under win-dose
you simply have no control options, under linux you can track these
bastards down and kill them. Based on impression (since windoze won't tell
you jack) my linux box has far fewer occurences of these loops. I have
never had to reboot linux because "it's been running for so long it hasn't
got any memory left", try using your win-dose box heavily for days and see
what happens.
Adios Glenn
>
>
> > I run a file server, and two other linux machines. Now, How do I
> > get my girlfriend to start using it??? <grin>.
> Get one <g>.
------------------------------
From: John Thompson <[EMAIL PROTECTED]>
Subject: Re: Lynx for cron-jobs
Date: Sat, 17 Jul 1999 09:28:45 -0600
Sascha wrote:
> I need to daily get a html-file via http, and save it local. I want to
> keep this as simple as possible with a cron job. So I wonder, if lynx
> can be invoked by commandline with the URL, save the corresponding file
> and then terminate by its own. The thing is, that I can't find this
> functionality in the lynx documentation, but my feeling tells me, that
> lynx can do this. if not, are there any other SIMPLE ways to do get
> files via http, and save them localy?
> Anybody have any suggestions? Thanks!
If I properly understand what you're trying to do here, I
suspect "wget" might be a better tool for the job.
--
-John ([EMAIL PROTECTED])
------------------------------
Date: Sat, 17 Jul 1999 09:31:48 -0700
From: Glenn Wittrock <[EMAIL PROTECTED]>
Subject: Re: newbie: 'ls' scrolls past top of screen
And once you have a preference for any of the fine commands listed in the
other replies, edit your .bashrc file for handy aliases. In the root
directory for each user ( and /root for root user) you will find a file
called .bashrc that holds preferences that are loaded when the user logs
in. I got sick of the huge task of ls -l |more so I added an alias thus
alias lsm='ls -l|more'
then when you type lsm you get the aliased command. I think today I'll
add an aliias for loctae= 'locate' , my favorite nuisance typo.
Adios Glenn
Andrew de los Reyes wrote:
> i just installed Linux and here's what keeps annoying me: when I type
> 'ls -l', the output scrolls past the screen. sometimes just 'ls' will
> solve the problem, but other times it still scrolls past. Is there any
> way to get it to pause between screens or some other solution (I am
> reminded of DOS' "dir /p").
>
> Thanks in advance,
> Andrew de los Reyes
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: Mon, 12 Jul 1999 02:49:28 -0400
From: Glitch <[EMAIL PROTECTED]>
Subject: Re: internal modem for Toshiba 7020CT
uhh what type of modem is it?
Jim Dai wrote:
>
> Toshiba Portege 7020 CT notebook
> RedHat 6.0
>
> Any chance to let Linux recognize the internal modem?
>
> J. G. "Jim" Dai
> School of Industrial and Systems Engineering
> and School of Mathematics
> Georgia Institute of Technology
> Atlanta, GA 30332-0205, USA
> +1-404-894-9139(O) +1-404-894-2301(Fax)
> http://www.isye.gatech.edu/faculty/dai/
--
"Bill Gates?, I dont know any Bill Gates. Oh, you mean 'by putting
every conceivable
feature into an OPERATING SYSTEM, whether you want it or not, is
innovation' Bill
Gates? Yeah, I know the monopolizer"
http://web.mountain.net/~brandon/main.htm
For Beginners in Linux, Emulation, Midis, Playstation Info, and
Virii.
------------------------------
From: Ivey Cole <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,redhat.kernel.general
Subject: RH6.0 at Boot. Unable to handle kernel paging request at virtual address
076a9
Date: Sat, 17 Jul 1999 17:31:05 GMT
Machine: 486 DX2, EISA/VLB, 32M, Adaptec
AIC7770 on motherboard, IDE boot drive, SCSI
CDROM
After what appears to be a perfect install
the boot fails with:
Code:<1>Unable to handle kernel paging
request at virtual address 000076a9
current->tss.cr3 = 00101000, %cr3 = 00101000
#pde = 00000000
Oops: 0000
EFlags: 00010086
eax: 000076a9 ebx: 00000000 ecx: 00000001
edx: 00000001
esi: 00096800 edi: c0fae000 ebp: c2800000
esp:c0fadd90
ds: 0018 es:0018 ss:0018
Process swapper (Pid:1, Process
nr:1,stackpage = c0fad000)
Stack: ...
Call Trace: ....
Code: 0f b6 0c 03 89 4c 24 14 51 68 d0 cb 1d
c0 e8 6e 9f 00 00 83
Aiee, killing interrupt handler.
At this point the system is completley locked
up.
I have tried two different systems with the
same motherboard and both fail the same.
RedHat 5.2 and Caldera OpenLinux 2.2 will
install and run on both systems. Older
versions of Linux have worked on these
systems too.
I've removed the L2 cache, changed CPU speed,
changed BIOS and EISA config settings, tried
to install on SCSI hard drives and IDE hard
drives, but all tries have failed the same.
The last message that appears on the screen
before the failure is the ATA IDE drive
initialization message when installed on IDE.
When installed on SCSI the last console
message before the failure is ROM drives
initialized. To date RedHat support has been
of no help. Their suspicion is that it is
the AIC7xxx driver, but I don't see any
messges that would suggest we have gotten
that far. On RH5.2 there is a message
regarding the floppy drive before the Adaptec
driver messages. I don't see the floppy
drive controller message using RH6.0. Anyway
I'm not well versed on debugging Linux and
don't know where to go next. Anyone have any
ideas as to how to determine where the
problem lies or how to interpret the screen
full of information at failure time? I have
taken an stab at matching the call trace to
the map (I boot from a RH5.2 hard drive and
mount the 6.0 drive). The call trace entries
are:
c3000000 - can't match to map
c0109635 - die
c01dcbd8 - error_table
c01de00e - error_table
c010ecb3 - do_page_fault
c01de00e - error_table
c0107838 - do_apm_timer
c01097cd - error_code
c0107838 - do_apm_timer
c01071be - apm_bios_call
c0107838 - co_apm_timer
c0100018 - startup_32
c01072c3 - apm_bios_call_simple
c0111839 - sys_ssetmask
c0107702 - get_event
c0107831 - check_events
c01078ac - do_apm_timer
c0111b60 - timer_bh
c0118769 - do_bottom_half
c010a769 - do_IRQ
c0109764 - ret_from_intr
c0190018 - ide_cdrom_dev_ioctl (I have SCSI!)
c0189ad8 - delay_50ms
c0189f9f - do_probe
c018a319 - probe_hwif
c018ad00 - ide_probe_init
c0106000 - get_options
c0106000 - get_options
c010615f - init
c010820f - kernel_thread
Any assistance will be appreciated.
Thanks,
Ivey Cole
================== Posted via SearchLinux ==================
http://www.searchlinux.com
------------------------------
From: Kor Kiley <[EMAIL PROTECTED]>
Subject: Legator Networker: Installation problem, libncurses.so.3.0
Date: Sat, 17 Jul 1999 14:09:05 -0400
I attempted to install the linux Legato Networker client on my Red Hat
linux 5.2 server and received the message:
failed dependencies:
libncurses.so.3.0 is needed by lgtoclnt-rh-5.1.0-2
after executing rpm -i lgtoclnt-rh-5.1.0-2.i386.rpm. I checked for
libncurses.so.3.0 on the disk and found it at
/usr/i486-linux-libc5/lib/libncurses.so.3.0, but doing an ls -l shows me
the following link:
-rwxr-xr-x 1 root root 244173 Sep 10 1998
libncurses.so.1.9.9e*
lrwxrwxrwx 1 root root 20 Nov 22 1998 libncurses.so.3.0
-> libncurses.so.1.9.9e*.
I tried putting the directory in the path but that didn't work. I also
tried creating the libncurses.so.3.0 link to 1.9.9e in /usr/lib where
other libncurses libraries are.
I was able to install the software by using the --nodeps switch. The
daemon, /usr/sbin/nsrexecd, is running and I'm able to back the machine
up ,but I'm unable to execute any of the legato utilities, like
nsradmin.
Any ideas.?! Thanks!
Kor
------------------------------
From: [EMAIL PROTECTED] (Vidar Andresen)
Crossposted-To: comp.os.linux.networking,comp.os.linux.hardware
Subject: Re: Linux driver for 3Com NIC:
Date: Sat, 17 Jul 1999 18:32:08 GMT
In article <[EMAIL PROTECTED]>,
HOKAFF <[EMAIL PROTECTED]> wrote:
>Does anyone know where I can get the Linux driver for 3Com's
>OfficeConnet 3CSOHO100-TX Fast Ethernet NIC ?
Try http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html
ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/3c59x.c
ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/test/3c59x.c
Or you might already have it. If it is old, get a new.
Mvh Vidar Andresen
------------------------------
Subject: Re: Solving the 1024 cylinder LILO problem
From: Johan Kullstam <[EMAIL PROTECTED]>
Date: 17 Jul 1999 14:35:15 -0400
[EMAIL PROTECTED] (Cameron L. Spitzer) writes:
> In article <7mmnpl$ler$[EMAIL PROTECTED]>, Villy Kruse wrote:
> >One wonders what makes it so "hard" to fit a few Mb big /boot partition
> >entirely within the first 1024 cylinders, when just one or two cylinders
> >would be enough for that partition.
> For many people, the first 1024 cylinders are occupied by a
> Microsoft product which was factory installed by a computer
> manufacturer, and it will cost them lots of time and money if they
> break that installation. Since they are not experts at the
> ever-changing world of BIOS revisions and patches, and can't control
> the interactions between their BIOS and the Microsoft Hardware
> Wizerd, they dare not attempt to modify their installations and
> cannot reinstall. You can disparage these people if you like, but
> this is the real-world environment to which the freeware community
> must adapt.
it's not a question of wanting to disparage anyone. it's a question
of how do we work with an ancient bios spec which cannot access the
whole of todays large disks? you cannot use a sofisticated operating
system until it's loaded. you have to use the bios in order to load
the operating system. just what do you propose we do?
you can still boot to ms-dos and use loadlin. other than that, the
only thing that has any chance of working is putting the kernel
somewhere below cylinder 1023 and having lilo access that via bios.
> For many more, it was not revealed to them before they partitioned
> their drive for Linux that LILO could not be installed if
> /dev/hda1 was more than 1023 cylinders. All the popular Linux
> distributions are broken in this way.
correction - all the popular *BIOSes* are broken this way. this
problem is not operating system specific. this is a boot problem
caused by deficiencies in the PC architecture.
> The "disk druid" and its counterparts need to be able to deal with
> this, and the file systems need some way to reliably create a file
> in the BIOS-accessible cylinders. Until that happens, there is
> something Microsoft does better than we do, besides marketing.
this problem affects microsoft operating systems too you know. load
up linux and cover more than 1023 cylinders. try to install windows.
the advantage microsoft holds is that it is pre-installed and
therefore already sits on the coveted below 1023 cylinder space of the
drive.
> Lilo and xf86config are the hardest part of installing Linux,
> because they happen to newcomers.
X is difficult because of the plethora of video cards (who ship no X
servers) and the interaction with the monitor hardware. it's getting
better but i agree, X can be a challenge.
> >If this is not possible you can still
> >put the contents of the /boot partition into a mounted fat32 or fat16
> >file system, run lilo, and the lilo loader will be happy.
>
> Not if the fat32 FS occupies non-BIOS-accessible cylinders.
your point? *BIOS* has to load you operating system you know. and in
order to load it, *BIOS* has to be able to access it. this is a
*BIOS* problem. take this to american megatrends and the other *BIOS*
manufacturers.
--
J o h a n K u l l s t a m
[[EMAIL PROTECTED]]
Don't Fear the Penguin!
------------------------------
Crossposted-To: comp.os.linux.setup,comp.os.linux.development.system
Subject: Re: Help please - want to limit size of user's e-mail on sendmail.
From: Johan Kullstam <[EMAIL PROTECTED]>
Date: 17 Jul 1999 14:22:47 -0400
Nico Zigouras <[EMAIL PROTECTED]> writes:
> Hello:
>
> I am running RedHat 5.2 and I want to set a limit on the amount of
> e-mail users can receive to 3 megs each user. Mail stays in
> /var/spool/mail mind you, because people view their mail through the web
> and my web e-mail program keeps mail there. So I can't limit size of
> home directories.
why can't you deliver mail to the users home directories? this is the
usual way things are done in order to enforce a mail quota. you could
make links out of /var/spool/mail to their various mailboxen if you
are unable to alter the web e-mail program.
> Hopefully I want it so that the system sends them a
> warning that they are at limit and new mail will be rejected by the
> server.
if all else fails, have your MTA deliver through a mail filter like
procmail. this filter would check the mailbox sizes.
> Any ideas? Thanks so much. Please at least reply to my e-mail.
--
J o h a n K u l l s t a m
[[EMAIL PROTECTED]]
Don't Fear the Penguin!
------------------------------
From: "Ryan Pearman" <[EMAIL PROTECTED]>
Subject: spontaneous reboots in RH 5.2
Date: Sat, 17 Jul 1999 13:42:28 -0500
Reply-To: "Ryan Pearman" <[EMAIL PROTECTED]>
First let me preface this: I'm a newbie to Linux, but not to Unix. I know
enough system administration to get by managing some computational
workstations for my research group. But that's about it -- I just get by.
Fortran progammer, probably couldn't write a makefile to save my life (since
I haven't needed to yet), and don't know that much C.
OK -- so here's the issue. I've got a mixed Win95/Linux system, Linux
sitting completely in the third partition because I was an idiot setting up
my system originally (before I knew anything about setting up Linux).
Celeron 300A O/C to 450 @ 2.2V, Asus P2-B, 128MB of PC100 memory, Matrox
G200, SB AWE32, Maxtor 13.6GB HD, ethernet card (for future hookup to my
crappy P133 system).
Trying out some in-house code that *works* on my RS/6000 and SPARCstation at
work. So I know that it's thouroughly debugged. Basically it's just a
bunch of matrix-vector and vector-vector multiplies. Running from the
command line -- no X. At approximately 53 minutes into the code, computer
decides to reboot. Linux is stable as a champ if I'm not doing anything.
I also have some spontaneous rebooting problems in X itself, usually about
10 minutes after I've activated a PPP connection. (I can't be sure it's
*never* rebooted when I haven't used PPP sometime during the login
session.....)
Took a look at some of the system logs -- nothing strikes me as odd,
although I'm not entirely sure what I'd be looking for.
Has anybody had problems with Linux rebooting spontaneously under some
serious number crunching? Or under PPP? Tips on how to isolate the
problem? Any help would be greatly appreciated.
--Ryan Pearman
remove unka to reply via email
--
"You know, I used to think it was awful that life was so unfair. Then I
thought, wouldn't it be much worse if life were fair, and all the
terrible things that happen to us come because we actually deserve them?
So, now I take great comfort in the general hostility and unfairness of
the universe."
Marcus Cole
------------------------------
From: Birger Toedtmann <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.security,comp.security.unix
Subject: Re: chroot-performing sshd?
Date: Sat, 17 Jul 1999 17:20:56 +0200
This is a multi-part message in MIME format.
==============39C876CF7BFB9F6652727558
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Dave Lugo wrote:
> [...]
>
> Forgive the format of these diffs, they are against ssh 1.2.26.
> The changes work under linux 2.0.x (RedHat 5.1). YMMV, depending
> n what version of UNIX you're running...
>
> /usr/local/lusers is a chrooted tree.
>
> If the user ssh'ing in is *not* in the normal /etc/passwd, they
> are looked for in /usr/local/lusers/etc/passwd. If they exist
> in the chrooted passwd file, they are dumped into the chrooted
> area.
>
> The above also alloctes chrooted pty's starting at a different
> minor/major than non-chrooted, to avoid users snopping each other's
> shell sessions...
Yeah, inspired by this, I wrote a small patch myself which
allows for configuring "UseChroot Yes" and to restrict the
behaviour to "ChrootGroup XXX" (if left out, apply to all users).
I did not take account of the pty issue, thinking that you may
provide pty's within the sandbox - or is this a major problem?
Maybe we could supply a working merger of the patches to the
author of ssh......
Open for suggestions -
Birger
--
Birger T�dtmann. Bielefeld, Germany.
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | \dc
00 83 E2 57 EC 60 0B 1C D3 18 AE 2A 40 55 81 22
==============39C876CF7BFB9F6652727558
Content-Type: text/plain; charset=us-ascii;
name="ssh-1.2.27chroot.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ssh-1.2.27chroot.patch"
Common subdirectories: ssh-1.2.27/gmp-2.0.2-ssh-2 and ssh-1.2.27chroot/gmp-2.0.2-ssh-2
diff -u ssh-1.2.27/servconf.c ssh-1.2.27chroot/servconf.c
--- ssh-1.2.27/servconf.c Wed May 12 13:19:28 1999
+++ ssh-1.2.27chroot/servconf.c Sat Jul 17 16:33:46 1999
@@ -111,6 +111,8 @@
options->password_authentication = -1;
options->permit_empty_passwd = -1;
options->use_login = -1;
+ options->use_chroot = -1;
+ options->chroot_group = -1;
options->silent_deny = -1;
options->forced_passwd_change = -1;
options->forced_empty_passwd_change = -1;
@@ -213,6 +215,10 @@
options->permit_empty_passwd = 1;
if (options->use_login == -1)
options->use_login = 0;
+ if (options->use_chroot == -1)
+ options->use_chroot = 0;
+ if (options->chroot_group == -1)
+ options->chroot_group = 0;
if (options->silent_deny == -1)
options->silent_deny = 0;
if (options->forced_passwd_change == -1)
@@ -248,7 +254,7 @@
sListenAddress, sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset,
sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sPidFile,
sForcedPasswd, sForcedEmptyPasswd, sUmask, sSilentDeny, sIdleTimeout,
- sUseLogin, sKerberosAuthentication, sKerberosOrLocalPasswd,
+ sUseLogin, sUseChroot, sChrootGroup, sKerberosAuthentication,
+sKerberosOrLocalPasswd,
sKerberosTgtPassing, sAllowTcpForwarding, sAllowUsers, sDenyUsers,
sXauthPath, sCheckMail, sDenyGroups, sAllowGroups, sIgnoreRootRhosts,
sAllowSHosts, sDenySHosts, sPasswordExpireWarningDays,
@@ -281,6 +287,8 @@
{ "tisauthentication", sTISAuthentication },
{ "passwordauthentication", sPasswordAuthentication },
{ "uselogin", sUseLogin },
+ { "usechroot", sUseChroot },
+ { "chrootgroup", sChrootGroup },
{ "allowshosts", sAllowSHosts },
{ "denyshosts", sDenySHosts },
{ "allowhosts", sAllowHosts },
@@ -382,7 +390,7 @@
cp = line + strspn(line, WHITESPACE);
if (!*cp || *cp == '#')
continue;
- cp = strtok(cp, WHITESPACE);
+ cp = strtok(cp, WHITESPACE);
for(i = 0; cp[i]; i++)
cp[i] = tolower(cp[i]);
opcode = parse_token(cp, filename, linenum);
@@ -588,6 +596,14 @@
intptr = &options->use_login;
goto parse_flag;
+ case sUseChroot:
+ intptr = &options->use_chroot;
+ goto parse_flag;
+
+ case sChrootGroup:
+ intptr = &options->chroot_group;
+ goto parse_int;
+
case sPrintMotd:
intptr = &options->print_motd;
goto parse_flag;
@@ -886,3 +902,5 @@
}
fclose(f);
}
+
+
diff -u ssh-1.2.27/servconf.h ssh-1.2.27chroot/servconf.h
--- ssh-1.2.27/servconf.h Wed May 12 13:19:28 1999
+++ ssh-1.2.27chroot/servconf.h Sat Jul 17 14:54:12 1999
@@ -115,6 +115,8 @@
int tis_authentication; /* If true, permit TIS authsrv auth. */
int password_authentication; /* If true, permit password authentication. */
int permit_empty_passwd; /* If false, do not permit empty passwords. */
+ int use_chroot; /* If true, do a chroot to homedir */
+ int chroot_group; /* If nonzero, chroot only when equal to gid */
int use_login; /* Use /bin/login if possible */
int silent_deny; /* 1 = deny by closing sockets. */
int forced_empty_passwd_change; /* If true, force password change if empty
diff -u ssh-1.2.27/sshd.c ssh-1.2.27chroot/sshd.c
--- ssh-1.2.27/sshd.c Wed May 12 13:19:29 1999
+++ ssh-1.2.27chroot/sshd.c Sat Jul 17 16:41:12 1999
@@ -619,6 +619,9 @@
is set whenever the key is used, and cleared when the key is regenerated. */
int key_used = 0;
+/* This is set when we have entered chroot. */
+int chroot_done = 0;
+
/* This is set to true when SIGHUP is received. */
int received_sighup = 0;
@@ -2776,6 +2779,19 @@
packet_send();
packet_write_wait();
+ /* If configured, do a chroot. */
+ if (options.use_chroot) {
+ if ((!options.chroot_group) || (options.chroot_group == pw->pw_gid)) {
+ debug("Doing chroot to %s.",pw->pw_dir);
+ if (chroot(pw->pw_dir)) {
+ log_msg("Requested chroot failed: [%d] %s\n",errno,strerror(errno));
+ do_authentication_fail_loop();
+ }
+ else
+ chroot_done = 1;
+ }
+ }
+
/* Perform session preparation. */
do_authenticated(pw);
}
@@ -4316,9 +4332,12 @@
read_environment_file(&env, &envsize, buf);
/* Change current directory to the user\'s home directory. */
- if (chdir(user_dir) < 0)
- fprintf(stderr, "Could not chdir to home directory %s: %s\n",
- user_dir, strerror(errno));
+ /* If chrooted, this has been done already */
+ if (!chroot_done) {
+ if (chdir(user_dir) < 0)
+ fprintf(stderr, "Could not chdir to home directory %s: %s\n",
+ user_dir, strerror(errno));
+ }
}
/* If debugging, dump the environment to stderr. */
Common subdirectories: ssh-1.2.27/zlib-1.0.4 and ssh-1.2.27chroot/zlib-1.0.4
==============39C876CF7BFB9F6652727558==
------------------------------
From: [EMAIL PROTECTED] (robert1930)
Subject: Re: Segmentation fault
Date: Sun, 11 Jul 1999 18:23:18 GMT
Short follow up on my situation..
I found a post somewhere out in newsgroup land that suggested that I
reboot.. I thought well there is not harm to that.. so I did.. and I
have no more problems with Segmentation fault errors..
So now my question would be what caused this in the first place.. I
just don't want this to be the first step of my system crashing and
burning..
Robert
[EMAIL PROTECTED]
On Sun, 11 Jul 1999 17:54:39 GMT, [EMAIL PROTECTED] (robert1930)
wrote:
>I have been trying to discover what Segmentation fault means and how I
>can fix it.. so far I have not found the answer so I thought I would
>do my own post to ask the question..
>
>Here is the situation.. I have a Pentium 300 running with 128 meg of
>memory and its running Redhat 6.0 with a kernel of 2.2.10 ..
>
>I have a couple directories that are showing this Segmentation fault
>error..
>
>To get the error I can go to the directory and type in
>
>ls -al
>
>Which would normally give me a detailed directory listing.. now if I
>type in ls by itself.. I get a listing.. but with the -al on it I get
>the Segmentation fault error..
>
>I attempted a tar of the directory and also get the error.. I
>attempted a copy of all the files in the directory and also get the
>error.. I moved the directory my doing a mv whatever whatever1 and
>that worked fine.. but the whatever1 still has the Segmentation fault
>error in it..
>
>So what are my options.. and do I have to worry about this spreading
>to other directories.. ?
>
>Oh and by the way the ls -al works fine elsewhere on the computer its
>just that one directory that is giving me the problem.. well at least
>so far..
>
>Robert Saunders
>[EMAIL PROTECTED]
>
>
>
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.misc) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Misc Digest
******************************