FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 09-26-2008, 09:26 PM
Till Maas
 
Default Creating a core dump / backtrace from /bin/login

Hiyas,

pam_mount is crashing /bin/login under special circumstances when I login via
a text console and I would like to get a backtrace. In a recent thread using
a core dump was suggested for a crashing window manager, but it was needed to
run a "ulimit -c unlimited" or similiar to get the core dump in the shell
before the window manager is started. But how can I do this for /bin/login?

Regards,
Till
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 09-26-2008, 11:12 PM
John Reiser
 
Default Creating a core dump / backtrace from /bin/login

How can I set ulimits for /bin/login?


For a general program: wrap the program in a shell script. Move the program
to a new name somewhere else, then put a script at the original name:
#! /bin/bash
ulimit -c unlimited
exec /path/to/new/name/of/original/program "$@"

For the case of /bin/login, perhaps there will be problems with the
initial environment; see INVOCATION in "man bash". Therefore, wrap
/bin/login in a short C program which calls setrlimit(3) then exec*()
the original 'login' which has been moved to a different location.
Beware the security implications due to running under setuid(), etc.

--

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 09-27-2008, 09:36 PM
Till Maas
 
Default Creating a core dump / backtrace from /bin/login

On Sat September 27 2008, John Reiser wrote:
> > How can I set ulimits for /bin/login?
>
> For a general program: wrap the program in a shell script. Move the
> program to a new name somewhere else, then put a script at the original
> name: #! /bin/bash
> ulimit -c unlimited
> exec /path/to/new/name/of/original/program "$@"

Thank you, this worked perfectly.

Regards,
Till
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 11:53 PM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org