SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
/proc/partitions shows you the partitions you have. You don't change /proc/partitions directly.
Tools such as fdisk, sfdisk, parted, and others modify the partitions you have.
Type "man fdisk" for more details of how to use fdisk. (or man sfdisk or man parted for those utilities)
Type "man proc" for details of the information provided under /proc.
Mostly this is for information gathering. There are SOME things that can be modified by writing into /proc but not much and not much you would want to try without very deep understanding of how to do that.
Accepting no responsibility for the outcome, one obvious thing is to change the permission on the file and then attempt to edit it. Since it is really a virtual file--existing only in memory--I think this would be a struggle for control with the kernel. My money says the kernel will win---I just don't know what the casualties will be.....
if anyone could manage to damage the system by mangling a /proc "file" it would be a reportable bug
Not sure I buy that - I've seen solutions for updating /proc/scsi by writing into it. If you can write presumably good information into it you would likely be able to crap out something by writing bad information into it. Not something I want to test at the moment though.
If using "rm -rf /" can damage your system without being a "bug" then it seems doing boneheaded writes into /proc wouldn't be a "bug" either.
Different situation - /proc is just an abstraction to allow kernel/driver code to expose data. Any directories/files needed have to be created and destroyed by that code.
Most are read only, but write is supported. But it's just a buffer for that bit of code. If it can't handle bad data/requests, it's a bug. Especially in kernel code.