Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
Can anyone give me a clue as to why I can't increase the vmalloc space? Anything I pass (as vmalloc=x) to the command line on boot seems to be just silently ignored. Is there some option I need to change in my kernel config? It's kinda frustrating having no idea what's going wrong.

~ # cat /proc/cmdline
root=/dev/ram rw ramdisk_size=262404 vmalloc=512M

~ # cat /proc/meminfo | grep Total
MemTotal: 1035984 kB
HighTotal: 262144 kB
LowTotal: 773840 kB
SwapTotal: 0 kB
VmallocTotal: 239608 kB

Adbot
ADBOT LOVES YOU

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

MOAR posted:

Did you try going up in smaller chunks first?
Does the kernel support large memory?
and what linux is it anyway?

Even lowering it to 192M has no effect. It's 3.8.5 cross compiled for 32bit powerpc, basically just running busybox. I'm not sure what large memory support would mean. The device only has one or sometimes two GB of memory.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

robostac posted:

Searching through my local linux source (3.6.11.4) suggests powerpc doesn't support a vmalloc command line parameter.

The only files matching param("vmalloc" are:
code:
arch/arm/mm/mmu.c
arch/s390/kernel/setup.c
arch/tile/kernel/setup.c
arch/unicore32/mm/mmu.c
arch/x86/mm/pgtable_32.c

Yeah, I think I might have found another solution changing the config in 'advanced options' to reduce the size of lowmem so the kernel gets a bit more. Compiling it now.

edit: it worked! I am the master of obscure poo poo!

edit2: works in emulator but refuses to boot on the actual hardware =[

Illusive Fuck Man fucked around with this message at 19:29 on Jun 4, 2013

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
How do I prevent linux from automatically mounting disks/partitions it detects filesystems on? For example, I need to partprobe /dev/vda to make the partition nodes show up in /dev/ but absolutely do not want to mount the fs detected on partition 4 in /media/vda4

I'm only running busybox in 3.9.5

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

Linux doesn't do this. Gnome does this. KDE does this. Some rescue disks do this. It won't get mounted by default. If this is happening, please provide more details so you can get an actual answer.

It's literally just busybox running on an ELDK minimal ramdisk with like SSH and poo poo added. If there's something I've put on there that would cause this, I have no idea what it would be.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

Only you can answer this question. You could look for pmount. Or "find /lib/mdev -name "*mount". But I have no idea what your environment is like, and Linux doesn't automatically mount anything when it detects it, even if it's in fstab, unless you are using automount, udev/mdev rules, gnome-mount, or some other external script.

Thanks, it was udev rules. There was a line in /etc/udev/rules.d/local.rules causing it. I'm still unfamiliar with a whole lot of stuff so sorry if this was a silly question.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
If something sends a write request to a block device, and then a read of the same data before the write has completed, what data should the read return? Is this something that needs to be handled by the block device driver, or does the file system driver have its own buffer / know to not do this? I believe it's the latter, but I want to be sure because I'm planning on writing a device mapper target.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

It should return what you wrote. It's a unified buffer cache. Your pending write will end up in dirty or locked buffers if it's written directly to a block device, and in both page cache (and buffers, but from the filesystem) if it's on a filesystem. It's a non-issue. Exactly what are you doing with embedded?

I can't really talk about the specifics because of an NDA and crap. It's a little silly because it's going to be open source in the end, but thems the rules. I'm writing a fancy device mapper target that does some work before writing stuff, and similar work after reading stuff.

In the dm-crypt source, which I'm modelling parts of my dm target after, when a write bio comes in, it gets sent to the crypto workqueue before anything touches the underlying block device. If a read bio comes in, it gets sent straight off to the underlying device without any check that a write is possibly still being encrypted. I guess I'm just asking if I've understood how this works correctly and if it's safe for me to do the same.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
Maybe not the right thread for this, but I dunno what is. I'm a cs dude who doesn't know poo poo about actually managing servers, and my job now requires me to manage servers. I have a whole bunch of servers with 1TB disks in them, and my boss wants them all to boot from the network and use the disk as temporary space or whatever.

/share/rootdir is exported by the nfs server as read only
The tftp server has pxelinux.0, pxelinux.cfg/default, kernel, and initrd (created with dracut)
The dhcp server hands out the path for pxelinux.0 and a rootpath=nfs:nfs_server:/share/rootdir
rootdir has a copy of rootdir/var in rootdir/varbkp
rootdir/etc/rc.d/rc.sysinit is modified to partition the disk (if necessary), mount /home and /var on the disk, and copy /varbkp to /var.

All of this works.

I guess this is kinda nice because I can just add another mac address to the group on the dhcp server every time I want to add another server, but I dunno. Is there a standard way to do this kinda thing? Also, at some point each server is going to need a different set of config files in /etc for some poo poo. I could have the sysinit script ssh somewhere and grab them but this seems dumb. This whole thing seems dumb. What the gently caress am I doing?

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

Red flags are going up.

Up higher. Why does he want this? NFSroot is fine for thin clients, LSTP, kiosks, and stateless servers. These won't be in the future.

The readonly root stuff will help you immensely here. Please look into it. You don't need rc.sysinit. Why do you even need /home? Why can't /var be tmpfs?

If it were me doing this for no reason, I'd partition the disks into a Ceph or Gluster node and mount filesystems off there so you get resiliency, performance, and some use out of all that wasted disk. Again though, why?


Here's where there are problems. If you need different config files in /etc, you have a few options:

Keep a copy of /etc/ on the disk somewhere and bind mount it (same readonly-root stuff).
Leave the servers stateless and provision on boot with Ansible, Puppet, Chef, or whatever. This is probably the best solution.

Thanks for this, I know I've got a ways to go with this stuff. I've started setting up cobbler and I'm learning to use puppet. I'm ditching the nfsroot plan for now because I didn't understand the advantages to begin with and everyone else is out of the country so I can probably get away with it. I originally had /var as a tmpfs but my boss was like "what if it runs out of ram?" I have no idea what circumstances would cause /var to grow to 16gb, but I didn't say that. The servers that would have been nfsroot are basically compute nodes running a bunch of VMs in our cloud project.

My next upcoming problem is that we're going to be running a lot of stuff we develop ourselves, so I can't exactly tell puppet to grab it from the regular centos repositories. Would the best way to do things be to package our stuff and create a yum repo on one of our servers that they can all get things from? Is all of this overkill for a currently really small company with like four people and 10ish servers? In a year we could have a poo poo ton more, so I like to think this isn't a waste.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
Sometimes I feel really unqualified for my job. Here's my latest problem.

I need a way to flip a pin on a pci-e slot. Specifically, I want to toggle the reset pin (A11). Either that, or just power cycle the whole slot. Most of the stuff I've found says to echo 1 into /sys/devices/pci0000:00/0000:00:xx.x/reset however this device doesn't actually identify itself to the system (doesn't show up in lspci or /sys/devices/). I can 100% guarantee there is no driver for this thing. If I designed it, it wouldn't be a loving pci-e card but I didn't and it is.

How can I do this? Do I need to write some kind of skeleton of a driver with just the ability to power cycle? Is this even possible?

edit to add a little detail: This device draws power from the pci-e slot, but as far as I know doesn't communicate at all. According to the manufacturer, it should honor a signal on the reset pin.

Illusive Fuck Man fucked around with this message at 22:15 on Nov 5, 2013

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
I just want to say that I cross-compiled zfs for linux 32 bit powerpc and it made me want to shoot myself. This doesn't reflect on the quality of zfs in any way, it's just something I've wanted to vent about for a while.

It was also like my first experience building linux/open source stuff. 6 months prior to that, my only impression of linux was "yeah its just like command prompt but you type ls instead of dir" ~I've come so far~

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
I'm trying to develop stuff and make sure it works properly on different distros, but I'm getting thrown off because they use different versions of certain packages and these versions sometimes behave radically differently. Is this a problem I'm going to run into frequently, and if so, how do you usually work around it? When we actually start showing this stuff to customers, I could put specific versions of packages in our repositories, but that seems hacky? I dunno. Also, if I get something working on CentOS and Ubuntu, am I okay in assuming it will work on similar distros?

Example: python-boto 2.13.3 with python 2.6 on CentOS vs 2.3.0 with 2.7 on Ubuntu. get_all_images() works as expected on Ubuntu, but returns an empty list on CentOS. I don't know why yet. I also had a problem with differing openssl versions in the past, but the recent update fixed that.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
My coworker wants to change all our servers from CentOS 6.4 to Ubuntu 12.04. I loving hate Ubuntu (probably irrationally). What are the standard arguments for using CentOS so I can convince my boss to veto this poo poo? They don't need to be pure objective Truth, I just want ammunition.

Right now I have this:
Our poo poo works as it is right now.
It's a hell of a lot easier to create RPM packages of our software compared with debs. (or I'm incompetent. idk)
We have working rpm repositories.
It's slightly simpler to manage rpm repos.
We're using Cobbler and cobbler doesn't handle ubuntu or deb repos well. (or I hosed something up when I attempted/failed to provision ubuntu)
I prefer kickstarts over preseed.
I prefer yum over apt.
Our poo poo works as it is right now.

The email I just got says the 2.6 kernel is causing "significant trouble" and I'm like what?? I kinda wish we could just hire someone who really knew what they were doing to handle this stuff but for now it's all me.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
Any ideas on what would cause a tap device created with 'ip tuntap add dev tap1 mode tap' and attached to a bridge to be non-functional? It is not receiving or sending any packets/bytes according to ifconfig, even though the bridge is getting stuff from the attached physical device.

essentially I have:
code:
~ # brctl show                                                                  
bridge name     bridge id               STP enabled     interfaces                                  
br1             8000.001122334455       no              eth1                    
                                                        tap1
~ # ifconfig br1                                                                
br1       Link encap:Ethernet  HWaddr 00:11:22:33:44:55                         
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1            
          RX packets:776 errors:0 dropped:0 overruns:0 frame:0                  
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0                 
          collisions:0 txqueuelen:0                                             
          RX bytes:31521 (30.7 KiB)  TX bytes:2406 (2.3 KiB)
~ # ifconfig tap1                                                               
tap1      Link encap:Ethernet  HWaddr FA:16:3E:12:DE:0D                         
          UP BROADCAST MULTICAST  MTU:1500  Metric:1                            
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                    
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                  
          collisions:0 txqueuelen:500                                           
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
edit: I've noticed that the tap device shows NO-CARRIER when I do 'ip link ls' -- still haven't found the reason
edit2: ended up recompiling kernel with macvlan support and using that instead. I guess that was more what I needed anyway.

Illusive Fuck Man fucked around with this message at 18:04 on Mar 20, 2014

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
I'm doing some funky poo poo again, and can't figure out how to get what I want.

I'm connecting to ISCSI targets using open-iscsi, and I want to be able to make sure the device nodes are created with specific names. As things are right now, it just uses the first free letter (/dev/sda, /dev/sdb, etc). Open-iscsi does not seem to have any option for specifying the device name when connecting.

For example, I want to connect to some target 'asdf' at 10.1.0.1 and place the device node at /dev/sdb. Here's dumb poo poo I've done so far:

Idea 1: Create a symlink from /dev/sde to /dev/disk/by-path/ip-10.1.0.1:3260-iscsi-iqn.asdf.org:blah-lun-1 (which is itself a symlink to /dev/sda)

Problems:
If you partition the device, there won't be any symlinks to the partitions.
If I later connect to another device (after /dev/sda has been created and /dev/sdb links to the /dev/disk/by-path/...), open-iscsi (or the scsi kernel module?) tries to create /dev/sdb, but can't. The connection succeeds but no device node is created.

Idea 2: When connecting to a new target, get rid of the nodes it creates automatically, and create my own device nodes with the correct major/minors

Problems:
This kinda works, except that when I fdisk /dev/sdb (Which I have created with major 8 and minor 0) and create a new partition, I end up with a /dev/sda1 instead of /dev/sdb1.

Is this something I can solve with udev rules somehow? I'm starting to get lost.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

Yes, you can do this, but you should not use /dev/sd[anything], and it's generally bad practice versus /dev/disk/by-id, but read on (these still work).

Problems with that link: I'd rather not connect, get the ID, set the rule, disconnect, reconnect aaaand... I can't seem to find scsi_id for this system. Probably need to compile it myself. Also, what are IDs for iscsi targets based on?

Illusive Fuck Man fucked around with this message at 22:03 on Apr 17, 2014

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

WWN, like everything else SCSI.

You'd have to "connect, get the ID, set the rule, disconnect, reconnect aaaand" for any udev rule.

Well, I got this working but it pretty much fails after the first device. I connect to the first target, get the ID, create the udev rule mapping it to /dev/sdb, and reconnect. Great, I have /dev/sdb. Second device: I connect, the kernel overwrites the /dev/sdb device node with this new ISCSI device. =[

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
I can't really talk about a lot of it, but essentially I have a bunch of block devices for some user. He says "I want you to attach my block device here." and then my stuff will set that up. The ID/iscsi path/uuid will be completely meaningless to the end user.

I'm starting to lean towards not honoring their request for the drive letter and instead somehow letting them know where it ended up after it's attached.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

Ok, so let's try this from another angle.

You have a working rule.

What do you see in "dmesg | grep rename" after you attach both disks?

Nothing. udev doesn't seem to be sending anything to dmesg. I turned on debug logging in udev.conf and "udevd-event[16431]: udev_rules_get_name: rule applied, 'sda' becomes 'sdb'" started showing up in /var/log/messages

I fixed it a bit by adding a default rule KERNEL=="sd*", BUS=="scsi", NAME="sdtemp%n", That way when I first connect, the device is assigned temp name and I get the scsi_id from that device node for the udev rule. My device nodes aren't getting overwritten anymore, but it does leave 'phantom' nodes lying around.

IE: I attach a device at sdb, udev logs naming sda to sdb, sdb nodes are correctly created but sda,sda1,sda2 still exist.
If I then attach a device with no partitions at sda, udev will log renaming sdb to sda, and the sda node will be changed to the correct device, but sda1 and sda2 still exist and are pointing to the partitions which are on 'sdb'

I think I can just remove the extra nodes if I do it carefully. Edit: I did and it worked!

Edit2: Not perfect, because if you fdisk and create partitions, it'll recreate these phantom ones if it can, but It's good enough for now.

Illusive Fuck Man fucked around with this message at 20:56 on Apr 18, 2014

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
Does anyone here have a strong understanding of the ext2 filesystem? I'm trying to create a script to build from source a root filesystem/ramdisk which will result in a byte-identical file every time. All my binaries are compiling nicely/identically now, but I'm discovering that compilation is the easy part and the actual file system is a little harder to build deterministically.

I've managed to build an empty filesystem identically by faking some timestamps and overwriting the 'directory hash seed', but as soon as I mount and actually copy files, everything goes to poo poo. Is there some kind of randomness to where blocks/inodes are allocated? Is this a hopeless/dumb struggle?

I could, instead, just make to a tool to verify that the hashes of the contents of a provided ramdisk match the contents of a ramdisk built from source, but I'm worried that a hypothetically malicious ramdisk builder could manipulate filesystem metadata in some kind of hypothetically evil way, while still satisfying this contents-checking tool.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

ExcessBLarg! posted:

Let's take a step back, what's your actual scenario and what are your objectives? Sounds like you're trying to implement some kind of verified boot strategy.

Exactly, there's some tpm extension-like stuff going on. The system runs a modified u-boot which grabs the kernel/ramdisk over tftp. There is no persistent storage attached. At some later point, the system needs to be able to perform some attestation-like stuff in which hashes of what u-boot loaded are signed.

Ideally, I'd like for anybody to be able to use this tool I'm working on to build an identical kernel/ramdisk from source so they can verify what's running.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

pseudorandom name posted:

Why transmit an ext2 filesystem when you could just use a cpio archive?

Because I'm an idiot and I didn't know you could do that. I think this will work. brb.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

Illusive gently caress Man posted:

Exactly, there's some tpm extension-like stuff going on. The system runs a modified u-boot which grabs the kernel/ramdisk over tftp. There is no persistent storage attached. At some later point, the system needs to be able to perform some attestation-like stuff in which hashes of what u-boot loaded are signed.

Ideally, I'd like for anybody to be able to use this tool I'm working on to build an identical kernel/ramdisk from source so they can verify what's running.


pseudorandom name posted:

Why transmit an ext2 filesystem when you could just use a cpio archive?

So I've been trying this for a little while, and the problem now is that the cpio file format includes device and inode numbers of the input files (Documentation says "These are used by programs that read cpio archives to determine when two entries refer to the same file.")

Hypothetically, I could make my own cpio generator (or a tool to parse/patch existing cpio files) which just sets the inode numbers in the archive incrementally or something.... but this sounds like another one of my idiotic hacks.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

/dev should be dynamically populated. Is there a reason you can't just exclude /proc, /sys, /dev, /tmp, and /var/tmp?

That's already on the todo list when I get around to fixing up our init stuff, but I don't see how that helps when the actual files placed in the archive will have different inode numbers on different systems.

edit: what I'm saying is, if I
mkdir asdf; ( cd asdf; find . | cpio -oc > ../asdf.cpio )
mkdir fdsa; ( cd fdsa; find . | cpio -oc > ../fdsa.cpio )

asdf.cpio and fdsa.cpio will differ in the 'char c_ino[8];' field of the cpio header for the archived directory "."

If identical files were placed in these directories, this would also be true for all of the archived files' headers.

Illusive Fuck Man fucked around with this message at 21:32 on Jun 5, 2014

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

evol262 posted:

That's intended behavior. You should be verifying gpg keys from your distribution that the archives are signed with, not md5sums or other hashes of the archives.

If you want end-users to be able to modify and distribute verified images, use tar.

There is no distribution involved here. Or I guess we're the distributor, but our model is that the end user doesn't need to place any trust in us. It would probably make more sense if I described the whole boot / attestation system but I'm really not supposed to :/

For now I guess I'll attempt something stupid and hacky, then once the patents are filed I can post it in the coding horrors thread.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
If the variable contains nothing but "-E" then yeah, you're literally passing -E as an argument to echo.

Here's a lazy fix: add a space in the variable, or in the quotes when you're calling echo. ie:
code:
a="-E "
echo "$a"
or
code:
a="-E"
echo "$a "

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

Splinter posted:

I'm looking for graphics card recommendations. I currently run 2 1080p monitors on a GeForce 7200 GS (256MB RAM) for software development work and general web browsing on Linux Mint 13 MATE with Compiz setup as the window manager. Graphics performance becomes sluggish when watching web video or when enabling some of the fancy Compiz settings. I'm looking for something that will run smoothly for general desktop use with all the fancy UI features turned on @ 1080p x2 (no gaming).

The computer is a Dell with a 2.66GHz Core2 quad core, 8GB RAM, PCI Express x16 and a 300W PSU. I can't get anything too beefy due to the limited space in the case (a long card won't fit) and low PSU wattage. I'm thinking I should be looking at something with at least 1GB of RAM due to the high resolution (3840x1080).

Budget is < $100. Ideally the card has solid drivers for Mint 13 (based on Ubuntu 12.04).

Any recommendations? Pardon me if this isn't the appropriate thread for this sort of question.

I grabbed a GTX750 for my development machine a couple months ago at just over $100 and it's working flawlessly at 1080p x 3 monitors with all the pretty effects turned on. You can probably go cheaper though. I would avoid AMD cards because in my experience the linux drivers are always absolute garbage compared to nvidia. (maybe this has changed?)

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
There's a library for working with a dumb piece of hardware. The library communicates with the hardware through some mapped physical memory. Nobody considered the possibility of multiple processes using the hardware at the same time until I looked at the code. Would a named semaphore used by the library be a good way to manage synchronization? What happens if a process locks the semaphore and then crashes?

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
I have a bunch of networked devices with no internal battery or persistent storage. When they boot, they have no idea what the time/date is. I need a way for these devices to securely get the time. When I say securely, I mean the devices should only accept a time which comes from 'me', or some server I control. Ideally, the devices should just have a trusted certificate on their disk which they can use to verify a chain a server provides.

ntpd seems to have an authentication mode that does something like this, but it's kinda confusing, involving servers dynamically signing each other's certificates. Also, instructions for setting it up are all pretty old and sometimes different from one another. Has anyone here ever dealt with a problem like this, using ntpd or otherwise?

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

IPvSH6T posted:

That looks like a contradiction to me, I assume the devices do have some form of persistent storage (where are they storing the ntpd binary?).

Autokey does provide for PKI-based authentication of NTP, though I've never set it up. As best I can tell it still requires storing the CA/CA equivalent certs somewhere. Assuming you do have some means of storing ntpd configuration on the devices, configuring symmetric key authentication is dead simple, but has the obvious caveat that anyone who could steal a device and read the keys would be able to masquerade as you, whereas with autokey they'd need to compromise the central timeserver or signing authority.

Yeah, I didn't word that very clearly. The devices load a kernel/ramdisk over tftp every time they boot. The devices do some software attestation poo poo later on, and one of our custom attestation protocols currently uses timestamps. This is dumb and backwards imo, and it's literally the only reason they need to know the time.

My current plan is to convince my boss to let me change the protocol to a more standard challenge-response deal, and forget about keeping time synchronized for now. Setting up a PKI for ntp seems like kind of a hassle (and extra annoying since this project already has a shitload of other key management issues for a bunch of other poo poo) and symmetric keys won't work for the reason you stated.

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
If I create an account with a shell of "/usr/bin/piss" and give someone ssh access to that account, there is no way they can pass arguments in, right? like they can't run "/usr/bin/piss --poo poo"

Just double checking i'm not doing something retarded.

Adbot
ADBOT LOVES YOU

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender

Docjowles posted:

They definitely can. Just try it out. For example, make a user and set the shell to /bin/ls. Then run
code:
ssh testuser@host -- -la
You'll see the contents of their home dir printed.

welp. Guess I just have to wrap whatever "/usr/bin/piss" in a shell script that doesn't pass the arguments then?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply