From: Isaac Dunham <idunham@lavabit.com>
To: musl@lists.openwall.com
Subject: Re: make -i with linux-pam
Date: Wed, 16 May 2012 07:23:36 -0700 [thread overview]
Message-ID: <20120516072336.1254b70e@newbook> (raw)
In-Reply-To: <20120516032449.GU163@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]
On Tue, 15 May 2012 23:24:49 -0400
Rich Felker <dalias@aerifal.cx> wrote:
> On Mon, May 14, 2012 at 05:09:31PM -0700, Isaac Dunham wrote:
> > On Mon, 14 May 2012 00:11:06 -0400
> > Rich Felker <dalias@aerifal.cx> wrote:
> >
> > > On Sun, May 13, 2012 at 08:58:24PM -0700, Isaac Dunham wrote:
> > > > .libs/pam_group.o: In function `check_account':
> > > > pam_group.c:(.text+0x12fe): undefined reference to `innetgr'
> > >
> > innetgr stub attached as patch.
>
> Patch missing. But I think it should just be extra aliases in
> src/network/ent.c...
Thought I'd attached it. Oh well.
Here's a version with it in ent.c as recommended.
> > Due to what logwtmp does (construct a wtmp log entry, then add to
> > the system logfile), a stub doesn't sound sensible unless you
> > actually want all logins to go unrecorded...however, it looks close
> > to trivial to actually implement.
>
> Syslog is for recording login events in the proper way
> (private/confidential for only admins to see). utmp and wtmp are
> misguided, insecure practices from the 1980s culture where it was
> considered rude to put a password on your unix account; they exist to
> publish to the world (well, everyone with accounts on the machine)
> your login status and the history of your logins...
Stub version attached.
With these two patches and some hacking of the PAM source, I got PAM
working.
> Huh? strncpy is pure C; it's always available to use.
Somehow mixed it up with strlcpy.
[-- Attachment #2: logwtmp.dif --]
[-- Type: application/octet-stream, Size: 758 bytes --]
diff --git a/include/utmp.h b/include/utmp.h
index b145a11..8ffe3d7 100644
--- a/include/utmp.h
+++ b/include/utmp.h
@@ -33,6 +33,7 @@ struct utmp *pututline(const struct utmp *);
void setutent(void);
void updwtmp(const char *, const struct utmp *);
+void logwtmp(const char *, const char *, const char *);
#define _PATH_UTMP "/dev/null"
#define _PATH_WTMP "/dev/null"
diff --git a/src/stub/utmpx.c b/src/stub/utmpx.c
index c483e4e..1d51d96 100644
--- a/src/stub/utmpx.c
+++ b/src/stub/utmpx.c
@@ -34,6 +34,10 @@ void updwtmpx(const char *f, const struct utmpx *u)
{
}
+void logwtmp(const char *l, const char *n, const char *h)
+{
+}
+
weak_alias(endutxent, endutent);
weak_alias(setutxent, setutent);
weak_alias(getutxent, getutent);
[-- Attachment #3: innet-stub.diff --]
[-- Type: text/x-patch, Size: 717 bytes --]
diff --git a/include/netdb.h b/include/netdb.h
index 33b7a0a..3849829 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -147,6 +147,8 @@ int *__h_errno_location(void);
#define TRY_AGAIN 2
#define NO_RECOVERY 3
#define NO_DATA 4
+
+int innetgr(const char *, const char *, const char *, const char *);
#endif
diff --git a/src/network/ent.c b/src/network/ent.c
index 4c2f24b..ebc0890 100644
--- a/src/network/ent.c
+++ b/src/network/ent.c
@@ -12,6 +12,11 @@ void *gethostent()
void endhostent(void)
{
}
+int innetgr(const char *netgroup, const char *host,
+ const char *user, const char *domain)
+{
+ return 0;
+}
weak_alias(sethostent, setnetent);
weak_alias(gethostent, getnetent);
next prev parent reply other threads:[~2012-05-16 14:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 3:58 Isaac Dunham
2012-05-14 4:11 ` Rich Felker
2012-05-14 18:01 ` Isaac Dunham
2012-05-14 18:17 ` Rich Felker
2012-05-15 0:09 ` Isaac Dunham
2012-05-16 3:24 ` Rich Felker
2012-05-16 14:23 ` Isaac Dunham [this message]
2012-05-21 19:12 ` aep
2012-05-21 19:28 ` Rich Felker
2012-05-21 20:24 ` aep
2012-05-21 20:55 ` Rich Felker
2012-05-21 21:08 ` aep
2012-05-21 21:20 ` Rich Felker
2012-05-22 16:51 ` Christian Neukirchen
2012-05-22 17:50 ` Rich Felker
2012-05-22 18:22 ` aep
2012-05-22 18:28 ` Rich Felker
2012-05-22 18:45 ` aep
2012-05-22 20:00 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120516072336.1254b70e@newbook \
--to=idunham@lavabit.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).