phhusson / sepolicy-inject

A fork of selinux-inject ( https://bitbucket.org/joshua_brindle/sepolicy-inject )
108 stars 85 forks source link

Impossible to build due to errors during 'make' #19

Open emanruse opened 1 year ago

emanruse commented 1 year ago

Hi,

I am trying to build this tool but I am getting errors:

$ make
cc -g -Wall -Werror -Wshadow -O2 -pipe -std=gnu11    sepolicy-inject.c  libs/x86/libsepol.a  -o sepolicy-inject
sepolicy-inject.c: In function ‘add_file_transition’:
sepolicy-inject.c:352:9: error: unknown type name ‘filename_trans_t’; did you mean ‘filename_trans_key_t’?
  352 |         filename_trans_t *new_transition = cmalloc(sizeof(*new_transition));
      |         ^~~~~~~~~~~~~~~~
      |         filename_trans_key_t
sepolicy-inject.c:353:23: error: request for member ‘stype’ in something not a structure or union
  353 |         new_transition->stype = src->s.value;
      |                       ^~
sepolicy-inject.c:354:23: error: request for member ‘ttype’ in something not a structure or union
  354 |         new_transition->ttype = orig->s.value;
      |                       ^~
sepolicy-inject.c:355:23: error: request for member ‘tclass’ in something not a structure or union
  355 |         new_transition->tclass = cls->s.value;
      |                       ^~
sepolicy-inject.c:356:23: error: request for member ‘otype’ in something not a structure or union
  356 |         new_transition->otype = tgt->s.value;
      |                       ^~
sepolicy-inject.c:357:23: error: request for member ‘name’ in something not a structure or union
  357 |         new_transition->name = strdup(filename);
      |                       ^~
sepolicy-inject.c:358:23: error: request for member ‘next’ in something not a structure or union
  358 |         new_transition->next = policy->filename_trans;
      |                       ^~
sepolicy-inject.c:360:32: error: assignment to ‘hashtab_t’ {aka ‘struct hashtab_val *’} from incompatible pointer type ‘int *’ [-Werror=incompatible-pointer-types]
  360 |         policy->filename_trans = new_transition;
      |                                ^
cc1: all warnings being treated as errors
make: *** [<builtin>: sepolicy-inject] Error 1

What should I do?

phhusson commented 1 year ago

As you can probably see, this project is dead, last commit is 6 years ago. What do you want to do? Maybe I can point you in another working direction?

Le jeu. 19 janv. 2023 à 18:41, emanruse @.***> a écrit :

Hi,

I am trying to build this tool but I am getting errors:

$ make

cc -g -Wall -Werror -Wshadow -O2 -pipe -std=gnu11 sepolicy-inject.c libs/x86/libsepol.a -o sepolicy-inject

sepolicy-inject.c: In function ‘add_file_transition’:

sepolicy-inject.c:352:9: error: unknown type name ‘filename_trans_t’; did you mean ‘filename_trans_key_t’?

352 | filename_trans_t new_transition = cmalloc(sizeof(new_transition));

  |         ^~~~~~~~~~~~~~~~

  |         filename_trans_key_t

sepolicy-inject.c:353:23: error: request for member ‘stype’ in something not a structure or union

353 | new_transition->stype = src->s.value;

  |                       ^~

sepolicy-inject.c:354:23: error: request for member ‘ttype’ in something not a structure or union

354 | new_transition->ttype = orig->s.value;

  |                       ^~

sepolicy-inject.c:355:23: error: request for member ‘tclass’ in something not a structure or union

355 | new_transition->tclass = cls->s.value;

  |                       ^~

sepolicy-inject.c:356:23: error: request for member ‘otype’ in something not a structure or union

356 | new_transition->otype = tgt->s.value;

  |                       ^~

sepolicy-inject.c:357:23: error: request for member ‘name’ in something not a structure or union

357 | new_transition->name = strdup(filename);

  |                       ^~

sepolicy-inject.c:358:23: error: request for member ‘next’ in something not a structure or union

358 | new_transition->next = policy->filename_trans;

  |                       ^~

sepolicy-inject.c:360:32: error: assignment to ‘hashtab_t’ {aka ‘struct hashtab_val ’} from incompatible pointer type ‘int ’ [-Werror=incompatible-pointer-types]

360 | policy->filename_trans = new_transition;

  |                                ^

cc1: all warnings being treated as errors

make: *** [: sepolicy-inject] Error 1

What should I do?

— Reply to this email directly, view it on GitHub https://github.com/phhusson/sepolicy-inject/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4ORUUAQQYAOKDYAFJQ3WTF4GLANCNFSM6AAAAAAUATZSZY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

emanruse commented 1 year ago

Thank you for the quick reply!

As you can probably see, this project is dead, last commit is 6 years ago.

Yes, I can see that but I am quite desperately looking for a way to modify sepolicy for the purpose of installing dnscrypt-proxy.

What do you want to do?

This:

https://github.com/DNSCrypt/dnscrypt-proxy/issues/2269

Maybe I can point you in another working direction?

Thank you. As you can see in the linked issue, I have done a pretty extensive research in which I have tried every possible option. I am searching for help everywhere. If you can help, that would be great.