utmp, branch HEADsimple login manager
c9c433b4e6e2549c0615160e9d11f3d50aed41252025-05-12T20:55:11Z2025-05-12T20:55:11Zbuild: Make build POSIX compatibleRoberto E. Vargas Caballerok0ga@shike2.netcommit c9c433b4e6e2549c0615160e9d11f3d50aed4125
parent 694c4dd18eb755266cf1e18d3620ddc66ea5b063
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Mon, 12 May 2025 22:55:11 +0200
build: Make build POSIX compatible
694c4dd18eb755266cf1e18d3620ddc66ea5b0632015-03-15T07:17:16Z2015-03-15T07:17:16ZDefine correct _XOPEN_SOURCE for setenvRoberto E. Vargas Caballerok0ga@shike2.comcommit 694c4dd18eb755266cf1e18d3620ddc66ea5b063
parent 8fcc4a561cbdbfb4bf67a2b3f7574d35b7c10e49
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 15 Mar 2015 07:17:16 +0000
Define correct _XOPEN_SOURCE for setenv
setenv is defined when _XOPEN_SOURCE is bigger than 600.
8fcc4a561cbdbfb4bf67a2b3f7574d35b7c10e492015-02-22T16:30:21Z2015-02-22T16:30:21ZAdd utmp string in error messagesRoberto E. Vargas Caballerok0ga@shike2.comcommit 8fcc4a561cbdbfb4bf67a2b3f7574d35b7c10e49
parent 81d0a50c7392fc4c985b0e71e708ccdd3815441a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 22 Feb 2015 16:30:21 +0000
Add utmp string in error messages
Utmp may be executed from st, and sometimes is difficult to see
who generate the error, so this patch helps.
81d0a50c7392fc4c985b0e71e708ccdd3815441a2015-02-22T16:28:42Z2015-02-22T16:28:42ZDefine _XOPEN_SOURCE=500 in posix modeRoberto E. Vargas Caballerok0ga@shike2.comcommit 81d0a50c7392fc4c985b0e71e708ccdd3815441a
parent 3900c06929f0184d80c0be3145afbb807b910471
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 22 Feb 2015 16:28:42 +0000
Define _XOPEN_SOURCE=500 in posix mode
utmpx interface is well defined only when _XOPEN_SOURCE=500
3900c06929f0184d80c0be3145afbb807b9104712015-02-22T16:27:41Z2015-02-22T16:27:41ZRemove double inclusion of utmpxRoberto E. Vargas Caballerok0ga@shike2.comcommit 3900c06929f0184d80c0be3145afbb807b910471
parent 2583293ac5eb66e988cb0492ca707779b8ea2be6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 22 Feb 2015 16:27:41 +0000
Remove double inclusion of utmpx
2583293ac5eb66e988cb0492ca707779b8ea2be62015-02-22T16:25:34Z2015-02-22T16:25:34ZUse setegid instead of setgidRoberto E. Vargas Caballerok0ga@shike2.comcommit 2583293ac5eb66e988cb0492ca707779b8ea2be6
parent 4a855c000f1d300a44c784ed88d78a11d41cdca7
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 22 Feb 2015 16:25:34 +0000
Use setegid instead of setgid
The definition of seteigd is better than the definition of
setgid, which behaviour depends of _POSIX_SAVED_IDS.
4a855c000f1d300a44c784ed88d78a11d41cdca72014-08-29T18:08:22Z2014-08-29T18:08:22ZLaunch a login shellRoberto E. Vargas Caballerok0ga@shike2.comcommit 4a855c000f1d300a44c784ed88d78a11d41cdca7
parent 9631182347109af70cc725aabd6d567c83e989ec
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 29 Aug 2014 20:08:22 +0200
Launch a login shell
Since we are creating a utmp entry, it is logical to create a login
shell
9631182347109af70cc725aabd6d567c83e989ec2014-08-28T09:41:54Z2014-08-28T09:41:54ZCopy test of getpwuid from stRoberto E. Vargas Caballerok0ga@shike2.comcommit 9631182347109af70cc725aabd6d567c83e989ec
parent 5ac5ede22b55ec5820dbacf1c5e5e9d9c2b2d9ad
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 28 Aug 2014 11:41:54 +0200
Copy test of getpwuid from st
This part of the code is identicall to the code of st, and st does
better tests that utmp was doing, so we take the code of st.
5ac5ede22b55ec5820dbacf1c5e5e9d9c2b2d9ad2014-08-28T09:37:41Z2014-08-28T09:37:41ZChange name of pass structureRoberto E. Vargas Caballerok0ga@shike2.comcommit 5ac5ede22b55ec5820dbacf1c5e5e9d9c2b2d9ad
parent 35bb808dbe01cba4f48f0a57fc76050c8d522fab
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 28 Aug 2014 11:37:41 +0200
Change name of pass structure
It is idiomatic the use of the simple pw instead of pass for
variables of type struct pass.
35bb808dbe01cba4f48f0a57fc76050c8d522fab2014-08-16T09:01:42Z2014-08-16T09:15:09ZRemove duplicated inclusion of utmp.hRoberto E. Vargas Caballerok0ga@shike2.comcommit 35bb808dbe01cba4f48f0a57fc76050c8d522fab
parent 33e676c66753d1a065db341d35a104fd7adda78e
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 16 Aug 2014 11:01:42 +0200
Remove duplicated inclusion of utmp.h
33e676c66753d1a065db341d35a104fd7adda78e2014-08-16T09:07:34Z2014-08-16T09:12:57ZRemove unneeded ctype.h headerRoberto E. Vargas Caballerok0ga@shike2.comcommit 33e676c66753d1a065db341d35a104fd7adda78e
parent 462c252f861254ba1ce1c0334ccad28f0e4c08c7
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 16 Aug 2014 11:07:34 +0200
Remove unneeded ctype.h header
462c252f861254ba1ce1c0334ccad28f0e4c08c72014-08-07T13:44:14Z2014-08-07T17:48:55ZReturn the status of child as status of utmpRoberto E. Vargas Caballerok0ga@shike2.comcommit 462c252f861254ba1ce1c0334ccad28f0e4c08c7
parent 836feec54d58f145d34b14baee7cb0ff677cbd26
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 7 Aug 2014 15:44:14 +0200
Return the status of child as status of utmp
It makes possible to can know what was the the exit status of the
command passed to utmp.
836feec54d58f145d34b14baee7cb0ff677cbd262014-08-07T12:52:19Z2014-08-07T13:36:07ZAvoid race conditions between fork and waitRoberto E. Vargas Caballerok0ga@shike2.comcommit 836feec54d58f145d34b14baee7cb0ff677cbd26
parent c282965520a0d8bcc2b8c2f010fd96ad063a25c3
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 7 Aug 2014 14:52:19 +0200
Avoid race conditions between fork and wait
If some signal arrives to the parent between these two points
then it is possible to have dirty entries in utmp.
c282965520a0d8bcc2b8c2f010fd96ad063a25c32014-08-07T12:31:08Z2014-08-07T12:31:46ZPass name of shell as first parameter of child processRoberto E. Vargas Caballerok0ga@shike2.comcommit c282965520a0d8bcc2b8c2f010fd96ad063a25c3
parent f9178df173d9c16ad238617f0ea155160c74a002
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 7 Aug 2014 14:31:08 +0200
Pass name of shell as first parameter of child process
This is important because this is the value that is usually
shown by ps (and it is also used by some windows managers to
display who is running).
f9178df173d9c16ad238617f0ea155160c74a0022013-10-10T16:54:00Z2013-10-10T16:54:00ZChanging the spelling and formatting for README.Christoph Lohmann20h@r-36.netcommit f9178df173d9c16ad238617f0ea155160c74a002
parent f7dcd4d7f36a82128f339f6446e87a7520e252cc
Author: Christoph Lohmann <20h@r-36.net>
Date: Thu, 10 Oct 2013 18:54:00 +0200
Changing the spelling and formatting for README.
Thanks Bjartur Thorlacius <svartman95@gmail.com>!
f7dcd4d7f36a82128f339f6446e87a7520e252cc2013-08-14T14:36:08Z2013-08-15T16:39:14ZFix portability problemsRoberto E. Vargas Caballerok0ga@shike2.comcommit f7dcd4d7f36a82128f339f6446e87a7520e252cc
parent e3e5dc6339876da57c7c634f035511e76eb7b345
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 14 Aug 2013 16:36:08 +0200
Fix portability problems
utmp interface is a very system dependet part in Unix. There are
three different interfaces: SystemV, POSIX and BSD, and they are
incompatibles between them. Utmp was using POSIX interface, but
not all the systems implement it (for examle OpenBSD doesn't it),
so it is desirable add the code for the three interfaces. This
patch adds this new code without using a ifdef hell.
e3e5dc6339876da57c7c634f035511e76eb7b3452012-11-03T16:34:47Z2012-11-03T16:34:47ZChanging to MIT/X and adding me to the contributers.Christoph Lohmann20h@r-36.netcommit e3e5dc6339876da57c7c634f035511e76eb7b345
parent fb5997dc0ba9a458e9ebc79252e54a5f93e6bab8
Author: Christoph Lohmann <20h@r-36.net>
Date: Sat, 3 Nov 2012 17:34:47 +0100
Changing to MIT/X and adding me to the contributers.
fb5997dc0ba9a458e9ebc79252e54a5f93e6bab82012-10-31T20:32:10Z2012-10-31T20:32:10ZSetting the setgid bit at the right moment. Thanks Stephen Paul Weber for reporting this!Christoph Lohmann20h@r-36.netcommit fb5997dc0ba9a458e9ebc79252e54a5f93e6bab8
parent d1b12bf78c564681c4fc1c5c0f36b3efe499f7d8
Author: Christoph Lohmann <20h@r-36.net>
Date: Wed, 31 Oct 2012 21:32:10 +0100
Setting the setgid bit at the right moment. Thanks Stephen Paul Weber for
reporting this!
d1b12bf78c564681c4fc1c5c0f36b3efe499f7d82012-10-31T19:21:39Z2012-10-31T19:21:39ZSome conversion problems in make dist are solved.Christoph Lohmann20h@r-36.netcommit d1b12bf78c564681c4fc1c5c0f36b3efe499f7d8
parent 014564adfe81bca6e03036ee6bc16ec6ab6029d1
Author: Christoph Lohmann <20h@r-36.net>
Date: Wed, 31 Oct 2012 20:21:39 +0100
Some conversion problems in make dist are solved.
014564adfe81bca6e03036ee6bc16ec6ab6029d12012-10-30T05:37:48Z2012-10-30T05:37:48ZInitial commit of utmp(1).Christoph Lohmann20h@r-36.netcommit 014564adfe81bca6e03036ee6bc16ec6ab6029d1
Author: Christoph Lohmann <20h@r-36.net>
Date: Tue, 30 Oct 2012 06:37:48 +0100
Initial commit of utmp(1).