X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_FRT_BELOW2,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20110322082737.GX31220@calimero.vinschen.de> References: <20110321191904 DOT GV31220 AT calimero DOT vinschen DOT de> <20110322082737 DOT GX31220 AT calimero DOT vinschen DOT de> Date: Tue, 22 Mar 2011 09:37:02 -0300 Message-ID: Subject: Re: Volume Shadow Copy in SSHD connection From: Bruno Galindro da Costa To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Ok Corinna, thanks for return, but I don=B4t understand how can I call these methods. Is there a bash functions? bruno DOT galindro AT SUNTECHDHFG1 ~ $ seteuid bash: seteuid: command not found As I understand, these are C / C++ methods available when I include these two libraries on my code header: #include #include If I try to use the first method (with password authentication): In the page http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overvie= w, right bellow the following text, there are a C source code explaining how to use the setegid and seteuid methods. ##### Back to this logon with password, how can this be used to implement set(e)uid? $$$ Well, it requires modification of the calling application. $$$ Two Cygwin functions have been introduced to support porting setuid applications which only require login with passwords. You only give Cygwin the right access token and then you can call seteuid or setuid as usual in POSIX applications. Porting such a setuid application is illustrated by a short example: ##### Any man page of setuid are pointed to a page that says: #### Standard C Library (libc, -lc) ##### I=B4dont know how to call these methods using the Cygwin.dll as you explained before... ******************************************************************** ******************************************************************** I=B4m need to execute the NTBackup application by running it from a ssh connection. Whenever I run it, the backup process can=B4t be started because the NTBackup application depends the Volume Shadow Copy is working properly. Every time that I start a new backup, the below error is displayed on the event viewer: **** Volume Shadow Copy Service error: An internal inconsistency was detected in trying to contact shadow copy service writers. Please check to see that the Event Service and Volume Shadow Copy Service are operating properly. ***** 2011/3/22 Corinna Vinschen: > On Mar 21 17:56, Bruno Galindro da Costa wrote: >> Corinna, >> >> =A0 =A0I=B4m need to build a small C++ program to exec the "vssadmin list >> writers" with another user context at the remote host? > > Huh? =A0No, of course not. =A0As the document describes, all of the metho= ds > are implemented in the Cygwin DLL as part of the seteuid system call. > You just have to choose which one you want to use. > >> =A0 =A0 but I need to acomplish the >> "Method 1" and this method needs the "NtCreateToken" function that I >> don=B4t know how to use... > > You don't have to. =A0It's all in the Cygwin DLL. =A0You should really re= ad > all of the text. =A0It explains how to use the other methods. > > > Corinna > > -- > Corinna Vinschen =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Please, send mails re= garding Cygwin to > Cygwin Project Co-Leader =A0 =A0 =A0 =A0 =A0cygwin AT cygwin DOT com > Red Hat > > -- > Problem reports: =A0 =A0 =A0 http://cygwin.com/problems.html > FAQ: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/ > Documentation: =A0 =A0 =A0 =A0 http://cygwin.com/docs.html > Unsubscribe info: =A0 =A0 =A0http://cygwin.com/ml/#unsubscribe-simple > > --=20 Att. Bruno Galindro da Costa -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple