char* user = NULL;

sscanf(optarg, "%s", user); //optarg from getopt()

Anyone see anything wrong with those 2 lines? I'm getting a segfault I think is coming from that line. Thanks.