Comments (8)
We need to decide the function name carefully to avoid under score(_
) hell.
from libseccomp-rs.
Looks like there's no perfect solution either, so do what you want.
My idea would be to directly map the C constants like "SCMP_FLTATR_*".strip("^SCMP_FLTATR_").to_lower()
:
get_act_default()
{get,set}_act_badarch()
{get,set}_ctl_nnp()
{get,set}_ctl_tsync()
{get,set}_api_tskip()
{get,set}_ctl_log()
{get,set}_ctl_ssb()
{get,set}_ctl_optimize()
{get,set}_api_sysrawrc()
from libseccomp-rs.
IMHO we should keep it as deprecated alias even if we bump to 0.3.0.
Generally I think it is the best to just keep deprecated stuff unless it is a security risk or blocks future development.
Good examples would be
https://mesonbuild.com/Reference-manual_builtin_meson.html
https://docs.rs/clap/latest/clap/struct.Arg.html
https://doc.rust-lang.org/std/index.html
from libseccomp-rs.
I'd like to change the name of {get,set}_no_new_privs_bit()
to {get,set}_nnp
.
In case of {get,set}_ssb
, If we unify the functions to full name like {get,set}_no_new_privs
, we have to define {get,set}_speculative_store_bypass
that is a very long name (so is get,set}_no_new_privs_bit()
).
Hence, I propose the new function names as follows:
get_default_action()
{get,set}_badarch_action()
{get,set}_nnp()
{get,set}_log()
{get,set}_ssb()
{get,set}_optimize()
{get,set}_rawrc()
{get,set}_tskip()
{get,set}_tsync()
@rusty-snake Could you give me your thoughts?
Ref. https://man7.org/linux/man-pages/man3/seccomp_attr_set.3.html
from libseccomp-rs.
It's nice for me. Thank you.
from libseccomp-rs.
@rusty-snake
Regarding rename of {get,set}_no_new_privs_bit
, Which would be better, we make the current function deprecated
or bump the version to 0.3.0
without deprecated
to avoid many deprecated
functions?
from libseccomp-rs.
Thank you for your suggestion and the information.
I thought that I'd like to avoid generating many deprecated functions , but I agree with your thoughts.
I'll create a PR to rename it with making it deprecated.
Wow, clap
has many deprecated functions :)
from libseccomp-rs.
I'll decide whether we should support {get,set}_api_tskip()
after seccomp/libseccomp#368 (comment) is solved.
from libseccomp-rs.
Related Issues (20)
- Cannot re-export `Error` struct. HOT 1
- io_safety HOT 7
- Prepare for v0.3.0 HOT 1
- Mark "kernel-derived" structs for unotify #[non_exhaustive]
- Add safety notes regarding "external memory safety"
- Add new syscalls for the libseccomp v2.5.4 HOT 1
- Rust 2021 edition HOT 1
- Builder like interface for ScmpFilterContext HOT 6
- Ideas for a higher level notification API HOT 6
- CI Warnings and use of actions-rs actions HOT 5
- Incorrect `socket` arg comparison example HOT 1
- Update bitflags dependency
- -
- Reconsider SeccompErrno design for `ScmpFilterAttr::ApiSysRawRc` HOT 1
- Rename some functions HOT 2
- RFC: Drop libseccomp < 2.5.0 support HOT 2
- Const syscall names for new arches in 0.4.0
- Update CHANGELOG for new syscalls
- Add a31a53d063d54b57428bc292e25a40d981d60537 to CHANGELOG.md
- Cherry-pick suggestion for release/v0.3.v branch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libseccomp-rs.