This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fw: setuid and seteuid




 that's a part of the problem, it doesn't ask for password.


 --- here is some more detail about the problem.
 I am logged into nt as my nt-domain user that has local nt-admin rights.


 su and some other programs make a call to setuid or seteuid. In normal
unix,
 the file 'su' is chmod to 4755 which is -rwsr-xr-x. There is no
 implementation of "set user execution bit on" in cygwin as far as I can
tell.


 In its very simple form the program:
 --------
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>


 main()
 {
 int ret;


 ret=seteuid(0);
 perror("err");


 }
 --------
 for me it gives "not owner".
 There is no way to "set user execution bit"
  Do you get something else, if so are you logged in as I am as above?

Anyway, my original problem is I am trying to rewrite sshd as an installable
nt service. The user "system" executes the program as a service but when the
seteuid call is made it errors out with, you guessed it "not owner".

"system" should have "run on behalf of another user" by default, so why
isn't the seteuid working? inetd works that way right?

> ============
> >>if I do an 'su - guest' or 'su - tuser1' , I get
> > >
> > >'su: cannot set user id: Not owner'
>
>
> >You can't change user context without giving a password
> >and if the process has special permissions.
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]