/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
#include <pwd.h>
#include <project.h>
#include <string.h>
#include <userdefs.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <strings.h>
#include "users.h"
#include "messages.h"
#include "funcs.h"
/*
* userdel [-r ] login
*
* This command deletes user logins. Arguments are:
*
* -r - when given, this option removes home directory & its contents
*
* login - a string of printable chars except colon (:)
*/
char *cmdname;
int
{
#ifndef att
#endif
int rc;
if (geteuid() != 0) {
}
opterr = 0; /* no print errors from getopt */
switch (ch) {
case 'r':
rflag++;
break;
case '?':
else
}
}
else
}
#ifdef att
#else
/*
* Do this with fgetpwent to make sure we are only looking on local
* system (since passmgmt only works on local system).
*/
}
break;
#endif
}
}
/* that's it for validations - now do the work */
/* set up arguments to passmgmt in nargv array */
/* finally - login name */
/* set the last to null */
/* remove home directory */
if (rflag) {
/* Check Permissions */
}
}
}
/* now call passmgmt */
ret = PEX_FAILED;
case PEX_SUCCESS:
if (ret != EX_SUCCESS)
break;
case PEX_BUSY:
break;
case PEX_HOSED_FILES:
break;
case PEX_SYNTAX:
case PEX_BADARG:
/* should NEVER occur that passmgmt usage is wrong */
else
break;
case PEX_BADUID:
/*
* uid is used - shouldn't happen but print message anyway
*/
break;
case PEX_BADNAME:
/* invalid loname */
break;
default:
break;
}
}
if (tries == 0)
/*
* Now, remove this user from all project entries
*/
if (rc != EX_SUCCESS) {
}
/*NOTREACHED*/
}