The kernel doesn't expose Bluetooth controllers as device nodes. They are managed through AF_BLUETOOTH network sockets.
The BlueZ daemon runs as root. It exposes services on the system D-Bus bus. Access to those services is governed by your D-Bus config. The upstream config simply provides access to all users, however your distribution may change this. The BlueZ daemon doesn't perform any access control of its own.
Bits of AF_BLUETOOTH can be used by unprivileged users, and I think bluetoothctl will talk AF_BLUETOOTH directly with the kernel where possible. But anything that's that related to configuring the Bluetooth hardware goes through the daemon.
But no, it's extremely unlikely that someone can just pop on and use your GPU in a default distro configuration.
Well, any application you run can use your GPU. It's no different from "using memory (to store data)" or "using the hard drive (to store files)". It's a hardware resource that's made available to applications so that they can use it. Applications can, and do, create various kinds of objects as GPU resources. These objects can generate output to be composited with the rest of the screen content through standard Wayland protocols and X extensions.
But if you're already of the mindset that most applications are inherently malicious, then you might want to consider ways to prevent them using this hardware. Frankly, I think this is all just ridiculous paranoia... but that seems to be where the OP is right now.
There is no way to prevent that in Linux. If you don't want anything to be able to use your hardware... don't have the hardware. For instance, you could run Linux inside a VM where the hardware is simply not present.
Protip on +, however it's possible that find will return so many values that the total size of your argument is bigger than the shell can take in a single command.
No it won't.
-exec doesn't run its commands through the shell. Furthermore, -exec knows exactly how many arguments are supported when executing a command.
In other words, -exec can split the arguments up into separate concerns in exactly the same way the xargs does.
You can have further predicates and operations after the -exec operation. find is not limited to "predicates plus a single operation"; any number of producers and operations can be mixed arbitrarily.
So there needs to be done token to indicate where the -exec operation ends. ; or + is that token (depending on how you use it).
Regarding the backslash, that's just to get that torn through your shell. You could other firms of writing instead of you like, e.g. -exec ... ';'.
In Wayland apps need to use the global shortcuts system
Perhaps a better way to put this is "under Wayland, the policy is defined by the compositor".
A compositor could allow applications to capture all input. In fact, a limited form of this exists precisely to support keyboard grabbing under XWayland.
But the important thing here is that this is now all under control of the compositor. The compositor can decide whether a particular application can grab the keyboard. It can decide which events actually get sent to that application. It can ensure the user is properly notified that this has occurred.
None of this was possible under X. If an X application asked to grab the keyboard, and the keyboard wasn't already grabbed, X would simply let that first application have it, no questions asked. An X compositor had no way to intercept that decision.
Wayland's "every frame is perfect" tagline is nice, but "policy is not baked into the protocol" is in my opinion far more important.
Do you want this string to be loaded into memory when the plugin is loaded, or are you simply going to look at the offline object file? That might guide how you choose the section it should live in.
Regardless, I wouldn't use .comment for this. A .note section might be more appropriate. See the Notes section of the elf(5) man page. You will want to supply your own vendor name as the "name" of the note, and within that you can allocate a "descriptor" ID to specify that the note contains the plugin category. The note data would contain that category string.
What filesystem are you using? Perhaps it doesn't support per-file permissions at all, or perhaps the permissions it does support are severely limited.
The question that comes to mind is "why do you need a different directory"?
You never need to manipulate any of the XML files in that directory yourself. They are manipulated by libvirt itself. For example, when you "define" a domain you can use any source XML file you like, from whatever location you want. It's libvirt that writes out the XML file under /etc/libvirt.
Similarly, when you enable or disable autostart on a domain, it's libvirt, not the user, that adds or removes a symlink to the domain XML under /etc/libvirt.
All of this means this directory is tied intimately into how libvirt works. If you wanted to use a different directory, you would need to patch the location in the libvirt source code.
If you are increasing the size, you need to enlarge the LV first, then the filesystem inside it. Most filesystem resize tools can be told to enlarge the filesystem to the current size of the backing device — i.e. you don't have to give the size to it as well.
If you are decreasing the size, you need to do things in the opposite order: shrink the filesystem first, then the LV around it. I usually play things safe by "over-shrinking" the filesystem, shrinking the LV, then enlarging the filesystem to match the LV size.
There is an fsadm utility that can be used to resize both the LV and the filesystem in one go, at least for common filesystems, but (mostly out of habit) I usually do the individual steps manually.
There are usually utilities to apply those settings manually.
For instance, X display resolution and arrangement can be set up with xrandr — or even statically in your Xorg configuration file.
Where a DE has an advantage is that it will have a daemon running that can react to events. For instance, when you plug in a new display it can determine what changes would be applied (perhaps because it remembered how you had attached things the last time this set of displays were present).
You'd probably have to do all that manually if you're not running a full DE.
Determining disk usage by adding up the sizes of files is never going to be correct. It doesn't take into account that space can be shared between files (through reflinks and multiple links to files), that space is allocated pay the end of files, and you also need to be careful not to count files twice (bind mounts can make your filesystem topology non-trivial).
Asking the filesystem "how much space are you using?" avoids all of those problems. That's what df does.
Not necessarily. If you read those files, you may very well read 64 GiB of data out of them.
Alternatively, even when it is not possible to continually read data, it may be possible to seek to any of those 64 GiB offsets and read some data. Sometimes the "size" of the file only represents the possible offsets a file description can have.
And I should not take that into account when assessing how much storage is being used up?
You should ignore everything about non-disk-backed filesystems if you're wanting to count the space used on disk.
The characters used to signal "end of file", "interrupt", "quit", "suspend", "literal next" and so on are handled by the terminal line discipline in your kernel, not by your terminal emulator. You can change them in a particular terminal with the stty utility. They cannot be arbitrary key combinations; they have to be actual.single characters (when you got C-c your terminal sends ASCII code 3, for instance).
I'm not aware of any CLI to do that, but if you want to drive the D-Bus interface manually, you could use something like:
The
sa{sv}arguments are:See this documentation for details.
The kernel doesn't expose Bluetooth controllers as device nodes. They are managed through
AF_BLUETOOTHnetwork sockets.The BlueZ daemon runs as root. It exposes services on the system D-Bus bus. Access to those services is governed by your D-Bus config. The upstream config simply provides access to all users, however your distribution may change this. The BlueZ daemon doesn't perform any access control of its own.
Bits of
AF_BLUETOOTHcan be used by unprivileged users, and I thinkbluetoothctlwill talkAF_BLUETOOTHdirectly with the kernel where possible. But anything that's that related to configuring the Bluetooth hardware goes through the daemon.Well, any application you run can use your GPU. It's no different from "using memory (to store data)" or "using the hard drive (to store files)". It's a hardware resource that's made available to applications so that they can use it. Applications can, and do, create various kinds of objects as GPU resources. These objects can generate output to be composited with the rest of the screen content through standard Wayland protocols and X extensions.
But if you're already of the mindset that most applications are inherently malicious, then you might want to consider ways to prevent them using this hardware. Frankly, I think this is all just ridiculous paranoia... but that seems to be where the OP is right now.
Yes, the superuser has access to all hardware.
There is no way to prevent that in Linux. If you don't want anything to be able to use your hardware... don't have the hardware. For instance, you could run Linux inside a VM where the hardware is simply not present.
No it won't.
-execdoesn't run its commands through the shell. Furthermore,-execknows exactly how many arguments are supported when executing a command.In other words,
-execcan split the arguments up into separate concerns in exactly the same way thexargsdoes.You can have further predicates and operations after the
-execoperation.findis not limited to "predicates plus a single operation"; any number of producers and operations can be mixed arbitrarily.So there needs to be done token to indicate where the
-execoperation ends.;or+is that token (depending on how you use it).Regarding the backslash, that's just to get that torn through your shell. You could other firms of writing instead of you like, e.g.
-exec ... ';'.crypttabcan say whether the volume should be unlocked at boot or not. You don't have to unlock it at boot if you don't want to.Define it in
/etc/crypttaband let it be automatically started during boot.Perhaps a better way to put this is "under Wayland, the policy is defined by the compositor".
A compositor could allow applications to capture all input. In fact, a limited form of this exists precisely to support keyboard grabbing under XWayland.
But the important thing here is that this is now all under control of the compositor. The compositor can decide whether a particular application can grab the keyboard. It can decide which events actually get sent to that application. It can ensure the user is properly notified that this has occurred.
None of this was possible under X. If an X application asked to grab the keyboard, and the keyboard wasn't already grabbed, X would simply let that first application have it, no questions asked. An X compositor had no way to intercept that decision.
Wayland's "every frame is perfect" tagline is nice, but "policy is not baked into the protocol" is in my opinion far more important.
Do you want this string to be loaded into memory when the plugin is loaded, or are you simply going to look at the offline object file? That might guide how you choose the section it should live in.
Regardless, I wouldn't use
.commentfor this. A.notesection might be more appropriate. See the Notes section of theelf(5)man page. You will want to supply your own vendor name as the "name" of the note, and within that you can allocate a "descriptor" ID to specify that the note contains the plugin category. The note data would contain that category string.Cron logs everything it executes to syslog. You'll see it in the systemd journal, or in the files written by your syslog daemon.
Cool!
But to help everyone in the future who lands on this post... what did you do to solve the problem?
What filesystem are you using? Perhaps it doesn't support per-file permissions at all, or perhaps the permissions it does support are severely limited.
It is very unlikely that locale category will be extended any further. It is already non-standard. It isn't specified by POSIX.
It may even be deprecated altogether.
The question that comes to mind is "why do you need a different directory"?
You never need to manipulate any of the XML files in that directory yourself. They are manipulated by libvirt itself. For example, when you "define" a domain you can use any source XML file you like, from whatever location you want. It's libvirt that writes out the XML file under
/etc/libvirt.Similarly, when you enable or disable autostart on a domain, it's libvirt, not the user, that adds or removes a symlink to the domain XML under
/etc/libvirt.All of this means this directory is tied intimately into how libvirt works. If you wanted to use a different directory, you would need to patch the location in the libvirt source code.
No. Almost everything available through procfs and sysfs is not available through a dedicated syscall.
I really wish you would too.
Decreasing swappiness doesn't necessarily decrease the amount of data written to storage. It often only affects what kind of data is written.
"Only" is doing a lot of heavy lifting there.
If you can impersonate another user, then you can do anything they can do.
If you are increasing the size, you need to enlarge the LV first, then the filesystem inside it. Most filesystem resize tools can be told to enlarge the filesystem to the current size of the backing device — i.e. you don't have to give the size to it as well.
If you are decreasing the size, you need to do things in the opposite order: shrink the filesystem first, then the LV around it. I usually play things safe by "over-shrinking" the filesystem, shrinking the LV, then enlarging the filesystem to match the LV size.
There is an
fsadmutility that can be used to resize both the LV and the filesystem in one go, at least for common filesystems, but (mostly out of habit) I usually do the individual steps manually.Handled entirely by your compositor. You need to use whatever configuration it provides.
There are usually utilities to apply those settings manually.
For instance, X display resolution and arrangement can be set up with
xrandr— or even statically in your Xorg configuration file.Where a DE has an advantage is that it will have a daemon running that can react to events. For instance, when you plug in a new display it can determine what changes would be applied (perhaps because it remembered how you had attached things the last time this set of displays were present).
You'd probably have to do all that manually if you're not running a full DE.
Just use
df.Determining disk usage by adding up the sizes of files is never going to be correct. It doesn't take into account that space can be shared between files (through reflinks and multiple links to files), that space is allocated pay the end of files, and you also need to be careful not to count files twice (bind mounts can make your filesystem topology non-trivial).
Asking the filesystem "how much space are you using?" avoids all of those problems. That's what
dfdoes.Not necessarily. If you read those files, you may very well read 64 GiB of data out of them.
Alternatively, even when it is not possible to continually read data, it may be possible to seek to any of those 64 GiB offsets and read some data. Sometimes the "size" of the file only represents the possible offsets a file description can have.
You should ignore everything about non-disk-backed filesystems if you're wanting to count the space used on disk.
The lack of any delays in that loop bothers me. So you really think chewing up 100% CPU while waiting is the best approach?
It might be just simpler writing it as:
I don't think this necessarily has anything to do with the problem at hand, but it certainly looks like this might be easier to debug.
The characters used to signal "end of file", "interrupt", "quit", "suspend", "literal next" and so on are handled by the terminal line discipline in your kernel, not by your terminal emulator. You can change them in a particular terminal with the
sttyutility. They cannot be arbitrary key combinations; they have to be actual.single characters (when you got C-c your terminal sends ASCII code 3, for instance).