Page MenuHomeFreeBSD

Remove caching from getlogin(2).
ClosedPublic

Authored by brooks on Apr 4 2018, 9:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 15 2024, 5:26 AM
Unknown Object (File)
Nov 10 2024, 10:09 AM
Unknown Object (File)
Nov 10 2024, 1:50 AM
Unknown Object (File)
Nov 8 2024, 6:44 AM
Unknown Object (File)
Nov 4 2024, 10:28 PM
Unknown Object (File)
Oct 21 2024, 3:52 AM
Unknown Object (File)
Oct 16 2024, 5:00 PM
Unknown Object (File)
Sep 23 2024, 12:45 PM

Details

Summary

This caching has existed since the CSRG import, but serves no obvious
purpose. Sure, setlogin() is called rarely, but calls to getlogin()
should also be infrequent. The required invalidation was not
implemented on aarch64, arm, mips, amd riscv so updates would never
occur if getlogin() was called before setlogin().

Reported by: Ali Mashtizadeh <ali@mashtizadeh.com>

Test Plan

needs a universe build

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15982
Build 15969: arc lint + arc unit

Event Timeline

lib/libc/gen/getlogin.c
77

Why is this strncpy() ?

Prefer strlcpy().

No functional change as the old code checked and checked and limited
length.

Makefile.inc1
805

It's not converted *to* a MD assembly stub though?

807

Aside, it's probably time to retire this one (ptrace), I'll take care of that later.

This revision is now accepted and ready to land.Apr 4 2018, 11:21 PM
  • rebase
  • Remove -DNO_CLEAN changes to Makefile.inc1. They will be in a seperate commit.
This revision now requires review to proceed.Apr 5 2018, 9:55 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 6 2018, 5:17 PM
This revision was automatically updated to reflect the committed changes.