summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2022-01-21 23:41:15 +0100
committerBalint Reczey <balint@balintreczey.hu>2022-01-21 23:41:15 +0100
commit0c04b92a9afe5e09a20307d8a5ec98d97ed00f47 (patch)
tree27f51b8f32e23b65d2ef2bbbae00c19fd036e81d /contrib
parent749c1780621163ca5108f164861324bafa9e0ae8 (diff)
downloadshadow-0c04b92a9afe5e09a20307d8a5ec98d97ed00f47.tar.gz
New upstream version 4.11.1+dfsg1upstream/4.11.1+dfsg1
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Makefile.in13
-rw-r--r--contrib/adduser-old.c52
-rwxr-xr-xcontrib/atudel85
-rw-r--r--contrib/groupmems.shar99
4 files changed, 43 insertions, 206 deletions
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index f68e3c7a..f77b1d3a 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -311,8 +311,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -336,7 +336,10 @@ ctags CTAGS:
cscope cscopelist:
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
diff --git a/contrib/adduser-old.c b/contrib/adduser-old.c
index 1bf1f225..e920e008 100644
--- a/contrib/adduser-old.c
+++ b/contrib/adduser-old.c
@@ -4,14 +4,14 @@
** --marekm
**
** 02/26/96
-** modified to call shadow utils (useradd,chage,passwd) on shadowed
+** modified to call shadow utils (useradd,chage,passwd) on shadowed
** systems - Cristian Gafton, gafton@sorosis.ro
**
** 6/27/95
** shadow-adduser 1.4:
**
-** now it copies the /etc/skel dir into the person's dir,
-** makes the mail folders, changed some defaults and made a 'make
+** now it copies the /etc/skel dir into the person's dir,
+** makes the mail folders, changed some defaults and made a 'make
** install' just for the hell of it.
**
** Greg Gallagher
@@ -19,20 +19,20 @@
**
** 1/28/95
** shadow-adduser 1.3:
-**
-** Basically a bug-fix on my additions in 1.2. Thanks to Terry Stewart
+**
+** Basically a bug-fix on my additions in 1.2. Thanks to Terry Stewart
** (stew@texas.net) for pointing out one of the many idiotic bugs I introduced.
** It was such a stupid bug that I would have never seen it myself.
**
** Brandon
*****
** 01/27/95
-**
+**
** shadow-adduser 1.2:
** I took the C source from adduser-shadow (credits are below) and made
** it a little more worthwhile. Many small changes... Here's
** the ones I can remember:
-**
+**
** Removed support for non-shadowed systems (if you don't have shadow,
** use the original adduser, don't get this shadow version!)
** Added support for the correct /etc/shadow fields (Min days before
@@ -56,7 +56,7 @@
** Brandon
** photon@usis.com
**
-*****
+*****
** adduser 1.0: add a new user account (For systems not using shadow)
** With a nice little interface and a will to do all the work for you.
**
@@ -119,14 +119,14 @@
void main()
{
- char foo[32];
+ char foo[32];
char uname[9],person[32],dir[32],shell[32];
unsigned int group,min_pass,max_pass,warn_pass,user_die;
/* the group and uid of the new user */
int bad=0,done=0,correct=0,gets_warning=0;
char cmd[255];
struct group *grp;
-
+
/* flags, in order:
* bad to see if the username is in /etc/passwd, or if strange stuff has
* been typed if the user might be put in group 0
@@ -137,24 +137,24 @@ void main()
*/
/* The real program starts HERE! */
-
+
if(geteuid()!=0)
{
printf("It seems you don't have access to add a new user. Try\n");
printf("logging in as root or su root to gain super-user access.\n");
exit(1);
}
-
+
/* Sanity checks
*/
-
+
if (!(grp=getgrgid(DEFAULT_GROUP))){
printf("Error: the default group %d does not exist on this system!\n",
DEFAULT_GROUP);
printf("adduser must be recompiled.\n");
exit(1);
- };
-
+ };
+
while(!correct) { /* loop until a "good" uname is chosen */
while(!done) {
printf("\nLogin to add (^C to quit): ");
@@ -178,19 +178,19 @@ void main()
} else
done=1;
}; /* done, we have a valid new user name */
-
+
/* all set, get the rest of the stuff */
printf("\nEditing information for new user [%s]\n",uname);
-
+
printf("\nFull Name [%s]: ",uname);
gets(person);
if (!strlen(person)) {
bzero(person,sizeof(person));
strcpy(person,uname);
};
-
+
do {
- bad=0;
+ bad=0;
printf("GID [%d]: ",DEFAULT_GROUP);
gets(foo);
if (!strlen(foo))
@@ -220,7 +220,7 @@ void main()
fflush(stdin);
-
+
printf("\nIf home dir ends with a / then [%s] will be appended to it\n",uname);
printf("Home Directory [%s/%s]: ",DEFAULT_HOME,uname);
fflush(stdout);
@@ -237,30 +237,30 @@ void main()
gets(shell);
if (!strlen(shell))
sprintf(shell,"%s",DEFAULT_SHELL);
-
+
printf("\nMin. Password Change Days [0]: ");
gets(foo);
min_pass=atoi(foo);
-
+
printf("Max. Password Change Days [%d]: ",DEFAULT_MAX_PASS);
gets(foo);
if (strlen(foo) > 1)
max_pass = atoi(foo);
else
max_pass = DEFAULT_MAX_PASS;
-
+
printf("Password Warning Days [%d]: ",DEFAULT_WARN_PASS);
gets(foo);
warn_pass = atoi(foo);
if (warn_pass==0)
warn_pass = DEFAULT_WARN_PASS;
-
+
printf("Days after Password Expiry for Account Locking [%d]: ",DEFAULT_USER_DIE);
gets(foo);
user_die = atoi(foo);
if (user_die == 0)
user_die = DEFAULT_USER_DIE;
-
+
printf("\nInformation for new user [%s] [%s]:\n",uname,person);
printf("Home directory: [%s] Shell: [%s]\n",dir,shell);
printf("GID: [%d]\n",group);
@@ -279,7 +279,7 @@ void main()
bzero(cmd,sizeof(cmd));
sprintf(cmd,"%s -g %d -d %s -s %s -c \"%s\" -m -k /etc/skel %s",
USERADD_PATH,group,dir,shell,person,uname);
- printf("Calling useradd to add new user:\n%s\n",cmd);
+ printf("Calling useradd to add new user:\n%s\n",cmd);
if(system(cmd)){
printf("User add failed!\n");
exit(errno);
diff --git a/contrib/atudel b/contrib/atudel
deleted file mode 100755
index 0ca87833..00000000
--- a/contrib/atudel
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright (c) 1996 Brian R. Gaeke
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Brian R. Gaeke.
-# 4. The name of the author, Brian R. Gaeke, may not be used to endorse
-# or promote products derived from this software without specific
-# prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY BRIAN R. GAEKE ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL BRIAN R. GAEKE BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# Additionally:
-#
-# This software is provided without support and without any obligation
-# on the part of Brian R. Gaeke to assist in its use, correction,
-# modification or enhancement.
-#
-#######################################################################
-#
-# this is atudel, version 2, by Brian R. Gaeke <brg@dgate.org>
-#
-
-require "getopts.pl";
-&Getopts('v');
-$username = shift(@ARGV);
-&usage unless $username;
-
-sub usage
-{
- print STDERR "atudel - remove all at jobs owned by a user\n";
- print STDERR "usage: $0 [-v] username\n";
- exit(1);
-}
-
-# odd. unless getpwnam($uname) doesn't seem to work for $uname eq "root" on
-# my linux system. but this does.
-die "user $username does not exist; stopping"
- unless defined(getpwnam($username));
-
-print "searching for at jobs owned by user $username ..." if $opt_v;
-
-chdir "/var/spool/atjobs" ||
- die "can't chdir to /var/spool/atjobs: $!\nstopping";
-opendir(DIR,".") || die "can't opendir(/var/spool/atjobs): $!\nstopping";
-@files = grep(!/^\./,grep(-f,readdir(DIR)));
-closedir DIR;
-
-foreach $x (@files)
-{
- $owner = (getpwuid((stat($x))[4]))[0];
- push(@nuke_bait,$x) if $owner eq $username;
-}
-
-if (@nuke_bait)
-{
- print "removed jobIDs: @{nuke_bait}.\n" if $opt_v;
- unlink @nuke_bait;
-}
-elsif ($opt_v)
-{
- print "\n";
-}
-
-exit 0;
diff --git a/contrib/groupmems.shar b/contrib/groupmems.shar
index 8472d93a..62e9b48a 100644
--- a/contrib/groupmems.shar
+++ b/contrib/groupmems.shar
@@ -76,36 +76,9 @@ else
$echo 'x -' extracting 'Makefile' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
/*
-# Copyright 2000, International Business Machines, Inc.
-# All rights reserved.
-#
-# original author: George Kraft IV, gk4@us.ibm.com
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. Neither the name of International Business Machines, Inc., nor the
-# names of its contributors may be used to endorse or promote products
-# derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY INTERNATIONAL BUSINESS MACHINES, INC. AND
-# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
-# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-# INTERNATIONAL BUSINESS MACHINES, INC. OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
+# SPDX-FileCopyrightText: 2000, International Business Machines, Inc.
+# SPDX-FileCopyrightText: 2000, George Kraft IV, gk4@us.ibm.com
+# SPDX-License-Identifier: BSD-3-Clause
#
X
all: groupmems
@@ -143,36 +116,9 @@ else
$echo 'x -' extracting 'groupmems.c' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'groupmems.c' &&
/*
-X * Copyright 2000, International Business Machines, Inc.
-X * All rights reserved.
-X *
-X * original author: George Kraft IV, gk4@us.ibm.com
-X *
-X * Redistribution and use in source and binary forms, with or without
-X * modification, are permitted provided that the following conditions
-X * are met:
-X *
-X * 1. Redistributions of source code must retain the above copyright
-X * notice, this list of conditions and the following disclaimer.
-X * 2. Redistributions in binary form must reproduce the above copyright
-X * notice, this list of conditions and the following disclaimer in the
-X * documentation and/or other materials provided with the distribution.
-X * 3. Neither the name of International Business Machines, Inc., nor the
-X * names of its contributors may be used to endorse or promote products
-X * derived from this software without specific prior written permission.
-X *
-X * THIS SOFTWARE IS PROVIDED BY INTERNATIONAL BUSINESS MACHINES, INC. AND
-X * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
-X * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-X * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-X * INTERNATIONAL BUSINESS MACHINES, INC. OR CONTRIBUTORS BE LIABLE
-X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-X * SUCH DAMAGE.
+X * SPDX-FileCopyrightText: 2000, International Business Machines, Inc.
+X * SPDX-FileCopyrightText: 2000, George Kraft IV, gk4@us.ibm.com
+X * SPDX-License-Identifier: BSD-3-Clause
X */
/*
**
@@ -436,36 +382,9 @@ else
$echo 'x -' extracting 'groupmems.8' '(text)'
sed 's/^X//' << 'SHAR_EOF' > 'groupmems.8' &&
X.\"
-X.\" Copyright 2000, International Business Machines, Inc.
-X.\" All rights reserved.
-X.\"
-X.\" original author: George Kraft IV, gk4@us.ibm.com
-X.\"
-X.\" Redistribution and use in source and binary forms, with or without
-X.\" modification, are permitted provided that the following conditions
-X.\" are met:
-X.\"
-X.\" 1. Redistributions of source code must retain the above copyright
-X.\" notice, this list of conditions and the following disclaimer.
-X.\" 2. Redistributions in binary form must reproduce the above copyright
-X.\" notice, this list of conditions and the following disclaimer in the
-X.\" documentation and/or other materials provided with the distribution.
-X.\" 3. Neither the name of International Business Machines, Inc., nor the
-X.\" names of its contributors may be used to endorse or promote products
-X.\" derived from this software without specific prior written permission.
-X.\"
-X.\" THIS SOFTWARE IS PROVIDED BY INTERNATIONAL BUSINESS MACHINES, INC. AND
-X.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
-X.\" BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-X.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-X.\" INTERNATIONAL BUSINESS MACHINES, INC. OR CONTRIBUTORS BE LIABLE
-X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-X.\" SUCH DAMAGE.
+X.\" SPDX-FileCopyrightText: 2000, International Business Machines, Inc.
+X.\" SPDX-FileCopyrightText: 2000, George Kraft IV, gk4@us.ibm.com
+X.\" SPDX-License-Identifier: BSD-3-Clause
X.\"
X.\" $Id$
X.\"