diff -Naur torque-2.5.3-snap.201010011607/contrib/AddPrivileges new/contrib/AddPrivileges --- torque-2.5.3-snap.201010011607/contrib/AddPrivileges 2010-07-20 20:57:38.000000000 +0300 +++ new/contrib/AddPrivileges 2010-10-08 13:16:05.090089268 +0300 @@ -63,7 +63,7 @@ ADMINGRD=10512 mkpasswd -l -d > $PASSWDF -mkgroup -l -d -u > $GROUPF; +mkgroup -l -d > $GROUPF; if id -G | grep -q "$ADMINGRD" diff -Naur torque-2.5.3-snap.201010011607/README.cygwin new/README.cygwin --- torque-2.5.3-snap.201010011607/README.cygwin 2010-07-20 20:57:41.000000000 +0300 +++ new/README.cygwin 2010-10-07 12:46:31.755474581 +0300 @@ -21,7 +21,7 @@ * Tested with the stable release Cygwin 1.5.25 on Windows XP Pro (32/64-bit) and on Windows Server 2003 SE (32-bit). -* Tested with the stable release Cygwin 1.7.5 on 64-bit Windows 7 Ultimate. +* Tested with the stable release Cygwin 1.7.7 on 64-bit Windows 7 Ultimate. * Can be used on heterogeneous Torque clusters. @@ -75,7 +75,8 @@ gcc or gcc4; make; openssh; - sunrpc; + sunrpc 4.0-3; + tcltk; util-linux; vim or mc is desirable. diff -Naur torque-2.5.3-snap.201010011607/src/resmom/requests.c new/src/resmom/requests.c --- torque-2.5.3-snap.201010011607/src/resmom/requests.c 2010-08-21 01:39:30.000000000 +0300 +++ new/src/resmom/requests.c 2010-10-06 15:11:39.430330090 +0300 @@ -296,17 +296,6 @@ return(-PBSE_BADUSER); } -#ifdef __CYGWIN__ - /* printf("TRY IAMADMIN FOR %s ", preq->rq_ind.rq_cpyfile.rq_user); */ - - if (IamUser() == 0) - { - log_err(errno, id, "Can`t run job with Administrator privileges"); - - return(-PBSE_BADUSER); - } -#endif /* __CYGWIN__ */ - useruid = pwdp->pw_uid; if (preq->rq_ind.rq_cpyfile.rq_group[0] == '\0') diff -Naur torque-2.5.3-snap.201010011607/src/resmom/start_exec.c new/src/resmom/start_exec.c --- torque-2.5.3-snap.201010011607/src/resmom/start_exec.c 2010-09-16 02:08:48.000000000 +0300 +++ new/src/resmom/start_exec.c 2010-10-08 13:26:32.949713241 +0300 @@ -6065,7 +6065,8 @@ /* become user to create file, if we aren't already the user. In * run_pelog setuid etc. are called and the this function is invoked, * so doing this again fails and is unnecessary */ - if (getuid() == 0) + + if (IamRoot() == 1) /* if (getuid() == 0) */ { if (setgroups(pjob->ji_grpcache->gc_ngroup,(gid_t *)pjob->ji_grpcache->gc_groups) != 0) {