Search:

Type: Posts; User: ppplayer80; Keyword(s):

Search: Search took 0.13 seconds.

  1. [ubuntu] Re: Setting SUID for every user on executable file

    Well, to be honest... It is an exercise on my studies (Operating Systems course). We have to write a program that launches bash shell with root's privileges and then make it executable for every user...
  2. [ubuntu] Re: Setting SUID for every user on executable file

    No. I have program wrote in C language. But yes, it uses sudo to call another program :)



    Well, that's it:


    system("sudo bash");
  3. [ubuntu] Re: Setting SUID for every user on executable file

    It does.


    But there must be a way to do it without a password :(
  4. [ubuntu] Re: Setting SUID for every user on executable file

    Okay, take a look at what I have here please:



    Where "[Directories...]" is a directory structure which I am sure is proper. And then I go into this directory and type

    And then it asks me for...
  5. [ubuntu] Re: Setting SUID for every user on executable file

    Yes, I understand. Thanks :)

    Well I wanted to use suid but it still seems not to be working... So I tried your method and... it still doesn't work. I basically lost any hope that it will ever...
  6. [ubuntu] Re: Setting SUID for every user on executable file

    Thanks Impavidus, now I get it. However it still asks me for a password when I try to execute this program. Maybe I'll say what this program basically does: it launches command prefixed with `sudo`....
  7. [ubuntu] Re: Setting SUID for every user on executable file

    Thanks for a reply.

    Well, I need to make it available for every user. Not only from specific user group. I just wonder why SUID does not work while it does not even display error message...
    And...
  8. [ubuntu] Setting SUID for every user on executable file

    Hi.

    I need to set executable file's properties to make it executable for every user with root's privileges. I found out that SUID will do the trick so I set file's properties with chmod command...
  9. Replies
    2
    Views
    557

    [C99] A question about malloc()

    Hi!

    If I do something like this:

    int *array = (int*) malloc(sizeof(int) * randomnumber);

    Does it mean that malloc creates an... lets say 'continuous' block of memory for this array? I mean,...
  10. Re: [C99] A difference between 2 similar functions?

    Thank you for the answer, @ofnuts!


    I'm sorry, but I don't understand this :-(
    EDIT//
    Ah... I think I get it. But that's what I said in the first post! I count from 0 to 7 in an 'array' version...
  11. [C99] A difference between 2 similar functions?

    Hi,

    I would like to ask what is the difference between these 2 functions:
    Function 1
    Function 2

    Because I am 100% sure there must be a difference. When I run my program with a first function,...
  12. Replies
    3
    Views
    346

    [SOLVED] Re: [C99] Question about a conjuction

    Thank you! :)
  13. Replies
    3
    Views
    346

    [SOLVED] [C99] Question about a conjuction

    Hi,

    I have a simple question.

    If I type something like

    if (a==1 && b != 3)
    And lets say that 'a' is equal to 2. Does a program check b's value or stops when it discovers that 'a' doesn't...
  14. Re: [C99] Using defined constant in a printf's format

    Big thanks to you guys, I almost get it now. I just don't understand that "dollar" part. The beginning of the steeldriver's post seemed to solve my problem, but then this appeared:
    ...
  15. [C99] Using defined constant in a printf's format

    Hi,

    I was wondering if it is possible to use a defined constant, like

    #define PRECISION 3
    In a printf format, like

    printf("%.PRECISIONf", SomeFloatVariable);

    How to define a number's...
  16. Replies
    4
    Views
    595

    [SOLVED] Re: [C] conflict of 2 if-else instructions

    Well, of course I will check this, but I'm 99% sure it does work as I described in a first post. Are you sure about this?
    I will check this a bit later, I cannot do it right now.

    Thank you for...
  17. Replies
    4
    Views
    595

    [SOLVED] [C] conflict of 2 if-else instructions

    Hi,

    I'm sorry if this problem was already discussed here. I don't know what to type in Google to find it.

    Here is a fragment of my code:

    if (var/900==1 || var/400==1)
    {
    var2[i]...
Results 1 to 17 of 17