Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHCP client code quality fixes #3190

Merged
merged 4 commits into from
Jan 28, 2020
Merged

DHCP client code quality fixes #3190

merged 4 commits into from
Jan 28, 2020

Conversation

kris7t
Copy link
Collaborator

@kris7t kris7t commented Jan 27, 2020

I finally had some time to fix up my implementation for DHCP client support. Sorry for the delay!

  • Unfortunately, I used spaces instead of tabs for my code in DHCP client support #3102 (I messed up something in Emacs, I think), which resulted in inconsistent indentation at least on GIthub. My first commit replaces the spaces with tabs, however, it does mess up git blame output a bit, so it is debatable whether we should merge it.
  • I fixed the unsigned comparison warning in Travis CI fail: error: comparison between signed and unsigned integer expressions #3174 that made the build fail due to -Werror.
  • Updated documentation (usage, firejail(1) and firejail-profile(5) manpages) with the new options.
    By the way, there seem to be some differences between default CFLAGS produces by ./configure on my machine and on Travis. Compiling with -Wall -Wextra -Werror seems prudent, but does not happen for me locally. Thanks for @Vincent43 for pointing out the ./configure --enable-fatal-warnings option! On the other hand, on Travis, C99 support is not enabled. Travis also uses older netlink headers, I think, for example, it does not define IFA_FLAGS.

Caused build failure in Travis (due to lack of C99 mode):

sbox.c: In function ‘sbox_run_v’:

sbox.c:185:3: error: ‘for’ loop initial declarations are only allowed in C99 mode

   for (int i = 3; i < max; i++)

   ^

sbox.c:185:3: note: use option -std=c99 or -std=gnu99 to compile your code
@Vincent43
Copy link
Collaborator

By the way, there seem to be some differences between default CFLAGS produces by ./configure on my machine and on Travis. Compiling with -Wall -Wextra -Werror seems prudent, but does not happen for me locally.

Travis uses ./configure --enable-fatal-warnings.

Copy link
Collaborator

@rusty-snake rusty-snake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I cannot speak C (yet), I cannot say anything about the code. The manpages looks good.

@kris7t kris7t merged commit 93cecca into netblue30:master Jan 28, 2020
kmk3 pushed a commit to glitsj16/firejail that referenced this pull request Sep 1, 2024
Sort commands and sections in firejail.1.in and sync the result with
firejail-profile.5.in.

* Commands: `--dbus-system.*`, `--dbus-user.*`, `--icmptrace`,
  `--ip=none`, `memory-deny-write-execute`, `--noinput`
* Sections: "LANDLOCK", "NAME VALIDATION"

Relates to netblue30#3190 netblue30#3406 netblue30#4209 netblue30#5856 netblue30#6078.
kmk3 pushed a commit that referenced this pull request Sep 10, 2024
Sort commands and sections in firejail.1.in and sync the result with
firejail-profile.5.in.

* Commands: `--dbus-system.*`, `--dbus-user.*`, `--icmptrace`,
  `--ip=none`, `memory-deny-write-execute`, `--noinput`
* Sections: "LANDLOCK", "NAME VALIDATION"

Relates to #3190 #3406 #4209 #5856 #6078.
kmk3 pushed a commit to glitsj16/firejail that referenced this pull request Sep 10, 2024
Sort commands in firejail.1.in and sync the result with
firejail-profile.5.in.

* Commands: `--dbus-system.*`, `--dbus-user.*`, `--icmptrace`,
  `--ip=none`, `memory-deny-write-execute`, `--noinput`

Relates to netblue30#3190 netblue30#3406 netblue30#4209.
kmk3 pushed a commit that referenced this pull request Sep 10, 2024
Sort commands in firejail.1.in and sync the result with
firejail-profile.5.in.

* Commands: `--dbus-system.*`, `--dbus-user.*`, `--icmptrace`,
  `--ip=none`, `memory-deny-write-execute`, `--noinput`

Relates to #3190 #3406 #4209.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants