1. What's "wrong" with #csh is it's a non-standard shell, many things work differently than in a #POSIX-compliant (bourne) shell, sometimes in subtle and surprising ways. For me, this is just unnecessary friction, you'll always use a bourne shell for scripting, and I want my interactive shell to work exactly the same (plus extensions of course). Regarding this, #fish is even worse, while #zsh by default is (almost) #POSIX-compliant, can emulate a lot (including #csh) and is comfortable by extensions.
2. #FreeBSD offers "toor" as a second name for "root" with its own entry in the passwd database. If you activate it (by setting a password), you can change the shell of *one* of the accounts safely, as long as the *other* one keeps having the default shell from base.
Introducing Momiji: a Gopher interface for Fediseer!
Currently you can only lookup some basic information per instance, and see all domains which they have endorsed, censured, hesitated, and guaranteed (and vice-versa) in a pure plain text format. I might write an interface for the whitelisted, suspicious, censured, and hesitated lists of instances too, but I'm not promising anything. :P As it stands, this simple Gopher CGI fits my needs for now. :kokoro_yes:
Logging in with your #API key is not supported (probably a bad idea anyway due to Gopher typically being unencrypted :satsuki_sadge:), so you won't be able to see some domain lists of instances that have restricted the viewing of endorsements/censures/hesitations they give, or modify anything in Fediseer.
It's all written in #POSIX #shell script, with the dcgi currently written with #Geomyidae's gophermap format in mind. You can see the source code (which you can treat as being in the public domain) in the URL I've given. Warning: It's pure shell script cancer! :kyou:
from pathlib import Path
p = Path('~').expanduser()
Does anyone want to know what I'm working on rn? Probably not, anyway
So yea, my current main project is this 'small' osdev project, to make something I'm terming "SynOS" (if you are fairly close to me and were also fairly close in april/may you'll know what the root of that name is)
This is made up of a couple of parts:
Azuma is the kernel of this OS, and I'm designing it to be a pure microkernel, which currently is targeting ARM64 (aarch64, w/e), this is the part I've done all of the work up until now on. Naming wise, I stole the name from LNER Azuma (who could've guessed) for basically no reason other than it looking and sounding cool lol - maybe one day I can say that I called it that because it's supposed to be fast or smth but now is not that day. One key design point with this kernel is that, to allow it to function as a pure microkernel, it handles "permissions" on processes, which is essential for drivers. This should also make it more secure, since a driver can't go rogue and start accessing the FS if it only has permissions to talk to, say, the USB bus
This is, well, the userspace, but operates using the permissions that I mentioned earlier. Hopefully I can make this fully POSIX compliant cos that just makes things easier development-wise (not for me tho 😅)
Anyway, I might post updates about this every so often, and here's the link to it:
#osdev #aarch64 #arm64 #posix #microkernel #synos #azumakernel
Jokes aside, there are so many #Posix non-compliant #shell implementations that are so cool, but almost any #shellScript expects a compliant env. It also does not seem to be too appealing of a skill to any employer :blobsad:
Anything out there like what I described that I'm missing maybe?
Is there a way to get username from uid using only #POSIX utilities? If no, I'll think about sending a proposal to POSIX to add a new flag to id for that.
LSM provides hooks only for access control
Systems like #grsecurity and RSBAC 1 need >just access
control. in Implementations like #AppArmor , LIDS 2 , #POSIX capabilitites ,Smack 3 ,TOMOYO 4 ,#SELinux, Stacking multiple security modules is problematic , LSM hooks expose kernel internal data structures as parameters, #Ethos is running inside the Xen Virtual Machine Monitor #VMM
#Xen Dom0 OS is typically Linux. #Virtualization allows to run Ethos alongside Linux. 4
when Dom0 receives a packet destined to an Ethos host, its routing/ARP tables allow it to deliver packet correctly.
(1) request was received on interface n’s partition,
(2) target address belongs to a host that exists on an interface
other than n.
(3) ensure Dom0 has ARP table entries for each Ethos host.
#Ethos immediately sends a packet to shadowdæmon upon booting, and shadowdæmon uses this
packet to update Dom0’s static ARP table
when Dom0 receives a packet destined to an Ethos host, its routing/ARP tables allow it to deliver the packet correctly.
e fileInformation system call is interesting in that Ethos supports file metadata typically
not present on Linux. Here shadowdæmon makes use of Linux’s getxattr/setxattr system calls
to store Ethos metadata along with the files it describes. Shadowdæmon is also responsible for
providing Ethos with random data using a Random RPC.
. Shadowdæmon is also responsible for providing Ethos with random data using a Random RPC
Ethos offers distributed types in the Etypes subsystem:
A notation, ETN, for specifying types, a machine-readable type description (“type graph”), A single wire format (ETE), Tools (userspace and kernelspace) to transform ETN into code that will encode, decode, and recognize types,Extensions to read and write system calls to check input and output,Programs specify what input types they allow,Validity of input (and outputs) enforced by OS
#Kerberos was motivated by the transition from single, time-sharing systems to distributed
networks of workstations
a Kerberos installation is made up of two services: an authentication service and a Ticket Granting Service(TGS).
X.509 added a graph-based trust model to its traditional hierarchical model , but
its design imposes a high performance overhead. SDSI  also provides a strong trust model,
but likewise does not perform well at Internet scale. Another alternative is the web of trust
used by #PGP
#SSH attempts to isolate private keys by protecting them
#Multics provides a hierarchical filesystem that is governed by access control lists. Processes
serve as subjects and can access objects in the storage system. Each subject has associated
with it a value called a principal identifier, which corresponds to the user on whose behalf the
process runs. Each object in the storage system has associated with it three modes, read, write,
and execute. For each mode, there exists a list of principal identifiers that may access the object
using the mode.
likewise #Unix authorization traditionally has been discretionary.
#Factotum acts as an authentication proxy.
Consider a POP email server that must implement the APOP authentication protocol. On
Plan 9, such an email server would receive requests from the network and process them. In the
case of authentication requests, the email server forwards the request to factotum. Factotum
then provides the email server with the response it should pass to the client. Never in this process are keys shared with the email server.
#HiStar’s flow controls contain effect of a compromised app , serving as a countermeasure to one of the facets of application based subversion. Even if an app is compromised, it cannot bypass the flow controls that HiStar imposes on it. bu An app that operates within its information-flow constraints could easily be programmed or misconfigured so that protections are missing.
on traditional Unix systems, still remain with HiStar’s Unix layer
About locales and standards (e.g. environment variables LC_*), a rant:
Cygnal gets rid of /cygdrive and understands paths like C:\Users\bob. And other changes, which are documented in detail with links to git commits.
"As the name implies, #smolOS is a small [#POSIX-like] operating system — small enough to run as a #MicroPython program on the low-cost Espressif #ESP8266 #microcontroller family" https://www.hackster.io/news/krzysztof-jankowski-s-micropython-based-smolos-puts-a-tiny-posix-like-environment-on-your-esp8266-0c776559152b
「 The BSD portion of the OS X kernel is derived primarily from FreeBSD, a version of 4.4BSD that offers advanced networking, performance, security, and compatibility features. BSD variants in general are derived (sometimes indirectly) from 4.4BSD-Lite Release 2 from the Computer Systems Research Group (CSRG) at the University of California at Berkeley 」
#POSIX spec still distinguishes between visual mode editors and line editors. This really mattered back in the days when cursor positioning over serial connections was hard (especially because of the speed of the serial connection).
Did anyone know that posix does not like:
mkdir -p -m 755 /opt
I didn't know that. I learned something new today. Unless this validator is flawed (see URL) https://www.shellcheck.net
I needed to break it up to validate.
# Create /opt directory if it doesn't exist
mkdir -p /opt
# Set permissions for /opt
chmod 755 /opt
Testing sudo-rs and improving sudo along the way, https://ferrous-systems.com/blog/testing-sudo-rs/.
sudo-rs is a re-implementation of sudo in Rust. While testing sudo-rs, they have found several inconsistencies in the specification, and found 2 bugs in the original sudo implementation.
This test suite can run on both implementations.
Link to sudo-rs: https://github.com/memorysafety/sudo-rs.
Sabias que para el 19-01-2038 a las 03:14:07 (UTC) los contadores de la hora en sistemas POSIX de 32 bits llegara a su limite? Luego de eso, estos contadores se reiniciarían volviendo al año 1901. Puede traer problemas en maquinaria pesada, sistemas embebidos, aviones y muchos componentes. Por esto se tienen que actualizar a sistemas de 64 bits, retrasando este problema.
Should `sort -f` to case-fold be enough? That seems to at least exist in both macOS and Linux.
I feel like ideally, I'd just have it sort "ASCIIbetical" order, i.e sort based on the byte values, like what `strcmp` would do. But there doesn't seem to be a standard flag for that.
I'm super impressed with `a-Shell` and `a-Shell mini` for #iOS. Having a POSIX shell environment on my iPad is amazing.
Several shell scripts I authored on my iPad using a-Shell's port of dash shell in POSIX mode worked as-is (sans the shebang line) when I ran them in bash on my Mac Mini.
 also:impressed "and by extension I'm impressed with WebAssembly. Wow."
TIL: If you write to a closed socket in #posix, your process receives SIGPIPE, whose default action is to kill your process.
Why???? The write() call communicates failure by returning 0 or -1 or whatever. Does it really need to also abort the process?
@nixCraft that is actually true...
This is why the default config for servers like #Apache and #PostgreSQL to literally be run as #daemons or rather #systemD services under dedicaded user accounts, so a webserver - even when hacked - can't f**k up the system.
Strictly speaking, the "silly things" example is wrong.
A modified example with (say) /.////////etc///// would have avoided involving this extra wrinkle.
In other popular non-SUS commands news there are jot, ifconfig, dnsqr, stat, fetch, less, and clear.
Do you think that the fgrep purists ought to not clear their screens, too? (-:
Or use any other name for their compiler than c99? (-:
Or be required to use only od to view non-text files? (-:
This is a perennial stupidity in the C and C++ worlds.
Because the C and C++ standards leave some things up to _other_ standards, including (ironically) #POSIX, the idea that one shouldn't talk about them in the comp.std.c and comp.std.c++ newsgroups mutated into a stupid dogma that C and C++ programs shouldn't rely upon anything from these other standards.
Oh wow, TIL: When you do input redirection from a file in #bash, e.g.
python whatever.py < foo.csv
the running command can actually stat() the stdin file descriptor and get the size of the input file! I would’ve expected that it’s more like “well, it’s your stdin, you can’t get the size for that, it’s a stream”.
And, to be fair, if you don’t directly associate the file to the command, it breaks. For example,
cat < foo.csv | python whatever.py
won’t supply a size.
What's a useful way to get a inter-process time source?
My goal is to get the time when a packet was received in one process, and then once it was sent over to a second process I want to be able to know how long ago it was originally received.
Using the wallclock for that seems not very useful because that can be adjusted.
Is it, for example, guaranteed that the monotonic time returned from POSIX clock_gettime() is comparable in different processes?
I need a solution (or one per platform) that works on at least Linux/Android, *BSD, Windows, macOS.
Thanks for any pointers!
Here is a long list of many of my interests: