Odd w/who behavior for the last 12 years
Hi all! Recently I was trying to fix UTMP logging support in Samba, which supposed to add login entries for all authenticated Samba sessions, writing down user, session ID and remote host into the UTMP database(s). It used to work with Samba 3.x and FreeBSD 6/7, but got broken since then, apparently. Fixing Samba code to support "new" utmpx.h API was easy, but, despite that I couldn't see the active session in the "w" and "who" output. Still, "last" was showing the session normally: timur smb/3863840071 test-server1.localFri May 25 14:20 - 14:37 (00:17) Quick look into the source code brought me to this 12 y.o. commit: https://svnweb.freebsd.org/base?view=revision=155875 > In wall and who, check that the utmp entry isn't stalled, as it is done in w. > Apparently with the new pts code stalled entries are printed, when they are > not with the BSD ptys. > > Submitted by: Michal Mertl > > That can be tracked down to the https://docs.freebsd.org/cgi/getmsg.cgi?fetch=822832+0+/usr/local/www/mailindex/archive/2006/freebsd-current/20060205.freebsd-current While for the "wall" this patch has sense, it's quite broken for the "who"(and similar broken "fix" exists for "w"). First of all, both of those programs supposed to show information about ALL active sessions on the given machine. From the top of my head, besides "ssh" and other programs, that allocate ptys there is a bunch of other programs that write their sessions into UTMP, namely: xdm/gdm, vsftpd(and probably few other FTPDs), gnome-terminal(I wrote the BSD* code in gnome-pty-helper) and Samba. I'm pretty sure I miss some other software that also stores session info into UTMP, but I hope my point is clear. Next, while in 2006 ptmx/pts was pretty flanky, there was a large work done by Rober Watson ( https://docs.freebsd.org/cgi/getmsg.cgi?fetch=324362+0+archive/2007/freebsd-current/20071209.freebsd-current) and Ed Schouten ( https://docs.freebsd.org/cgi/getmsg.cgi?fetch=22996+0+archive/2008/freebsd-current/20080727.freebsd-current) that should fix the issues with ghost ptys. So I propose to remove the said patch(or make it verify only "pts/" devices). any objections? With regards, Timur Bakeyev. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: gcc/g++ 4.2.1 -r334125 is getting devd related build failures on ci.freebsd.org
On 24 May 2018 at 03:34, Mark Millardwrote: > [This submittal is in part an experiment with how Eitan's > MUA classifies the Email using an alternate yahoo.com > address. Eitan: the subject and this note are all unique > to this message.] > > Gmail still considers all your mails as spam :( > This message has a from address in yahoo.com but has failed yahoo.com's required tests for authentication. WBR, Timur Bakeyev ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: samba/NSSWITCH interaction in fbsd 10 vs fbsd 8
Do you use net/samba36 port? Looks like you don't... @@ -6336,12 +6373,13 @@ NSSSONAMEVERSIONSUFFIX=.2 WINBIND_NSS_EXTRA_OBJS=../nsswitch/winbind_nss_linux.o ;; - *freebsd[[5-9]]*) + *freebsd*) # FreeBSD winbind client is implemented as a wrapper around # the Linux version. NSSSONAMEVERSIONSUFFIX=.1 WINBIND_NSS_EXTRA_OBJS=../nsswitch/winbind_nss_freebsd.o \ ../nsswitch/winbind_nss_linux.o + WINBIND_WINS_NSS_EXTRA_OBJS=../nsswitch/wins_freebsd.o WINBIND_NSS=../nsswitch/nss_winbind.$SHLIBEXT WINBIND_WINS_NSS=../nsswitch/nss_wins.$SHLIBEXT ;; On Mon, Nov 10, 2014 at 1:14 PM, Julian Elischer jul...@freebsd.org wrote: When I try use the libnss_winbind.so that is generated by samba 3.6 I get the following message: NSSWITCH(nss_load_module): winbind, Undefined symbol nss_module_register. First I have to change its' name to nss_winbins.so.1 however because that is what nsswitch is looking for (BTW where is that documented??) then it finds it but fails as mentioned above. This same samba source generates good nss files in 8.0 but under 10 it fails.. Literally it's the same sources just checked out into a different build system. (10 vs 8). Has there been a change in the API for the nss modules? where it he API for nsswitch files documented? Julian ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: OpenLDAP/nss_ldap/pam_ldap
Hi, Steve! On Tue, Oct 28, 2003 at 02:52:51PM -0800, Steve Lee wrote: Question ? I am using FreeBSD 5.1 I have gotten FreeBSD 5.1 to authenticate user remotely ssh ing to the box. They can log in, but when they log in, the system shows their userid instead of the username when you do a ps. this tells me something might be wrong with nss_ldap. but not sure what i am doing wrong. I can do id username which it returns the user information. does anyone have an idea what i didn't do during my setup of OpenLDAP/nss_ldap/pam_ldap ? Thanks. I would like to confirm that such weirdness exists... I do use nss_ldap and also noticed, that some of the programs, like ls, show numeric id of the user, when other, like top, show normal username, retrieved from LDAP server. Short investigation brought me to the conclusion, that the behaviour differs depending if the program was linked against libc statically or dynamically... This short code exposes the problem: #include stdio.h #include pwd.h int main () { struct passwd *pw = getpwuid(1002); printf(%s\n, (pw) ? pw-pw_name : none); } Instead of 1002 put the uid of the user from LDAP. If you compile this program as: gcc test.c -o test Which normally implies dynamic linking, when you should get username in the output. If you compile it as: gcc -static test.c -o test When none will be printed instead... So, the problem lays somewhere in the libc, in the way, how getpwuid and friends work in the dynamic and static context with NSS... I don't know, is this a bug or a feature :) If first, then, probably, PR should be created. With regards, Timur. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to [EMAIL PROTECTED]