In libcgroup testcase "setuid" testcase segfault when we run without uid
parameter.
This patch fixes the issue.

Signed-off By: Rishikesh k Rajak <[EMAIL PROTECTED]>
---
Index: tests/setuid.c
===================================================================
--- tests.orig/setuid.c
+++ tests/setuid.c
@@ -43,6 +43,11 @@ int main(int argc, char *argv[])
        /* Return codes */
        int ret;

+        if (argc < 2) {
+               printf("Usage:  setuid uid_value \n");
+               goto finished;
+       }
+
        pwd = getpwnam(argv[1]);
        uid = pwd->pw_uid;
        fprintf(stdout, "Setting UID to %s (%d).\n", pwd->pw_name, uid);

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to