Skip to content
Snippets Groups Projects
Commit 3833a9bc authored by Pavel Vondruška's avatar Pavel Vondruška
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #30 passed
image: debian:stretch
# Is performed before the scripts in the stages step
before_script:
- source /etc/profile
variables:
DEBEMAIL: "Pavel Vondruska <dexter.cz@gmail.com>"
# Defines stages which are to be executed
stages:
- build
# Stage "build"
run-build:
stage: build
script:
- ./make.sh
# This stage is only executed if commited to master
only:
- master
# The files which are to be made available in GitLab
artifacts:
paths:
- build/*
Index: nfs-utils-1.3.4/utils/gssd/krb5_util.c
===================================================================
--- nfs-utils-1.3.4.orig/utils/gssd/krb5_util.c
+++ nfs-utils-1.3.4/utils/gssd/krb5_util.c
@@ -831,7 +831,7 @@ find_keytab_entry(krb5_context context,
* single realm, but we code with the assumption that
* someday it may actually return a list.
*/
- code = krb5_get_host_realm(context, targethostname, &realmnames);
+ code = krb5_get_host_realm(context, myhostname, &realmnames);
if (code) {
k5err = gssd_k5_err_msg(context, code);
printerr(0, "ERROR: %s while getting realm(s) for host '%s'\n",
Index: nfs-utils-1.3.4/utils/gssd/svcgssd.c
===================================================================
--- nfs-utils-1.3.4.orig/utils/gssd/svcgssd.c
+++ nfs-utils-1.3.4/utils/gssd/svcgssd.c
@@ -108,7 +108,11 @@ main(int argc, char *argv[])
idmap_verbosity++;
break;
case 'n':
- get_creds = 0;
+ /*
+ * Creds are necessary for passing enctype limits,
+ * using krb5 library hack.
+ */
+ setenv("KRB5_IGNORE_ACCEPTOR","1",1);
break;
case 'v':
verbosity++;
Index: nfs-utils-1.3.4/debian/nfs-common.init
===================================================================
--- nfs-utils-1.3.4.orig/debian/nfs-common.init
+++ nfs-utils-1.3.4/debian/nfs-common.init
@@ -156,6 +156,7 @@ case "$1" in
then
do_modprobe sunrpc
do_modprobe nfs
+ do_modprobe nfsv4
do_modprobe nfsd
mkdir -p "$PIPEFS_MOUNTPOINT"
if do_mount rpc_pipefs $PIPEFS_MOUNTPOINT
Index: nfs-utils-1.3.4/utils/nfsidmap/nfsidmap.c
===================================================================
--- nfs-utils-1.3.4.orig/utils/nfsidmap/nfsidmap.c
+++ nfs-utils-1.3.4/utils/nfsidmap/nfsidmap.c
@@ -17,6 +17,7 @@
#include "conffile.h"
int verbose = 0;
+int timeout = 600;
char *usage = "Usage: %s [-vh] [-c || [-u|-g|-r key] || -d || -l || [-t timeout] key desc]";
#define MAX_ID_LEN 11
@@ -209,6 +210,10 @@ static int id_lookup(char *name_at_domai
return EXIT_FAILURE;
}
+ /* Set timeout to 10 (600 seconds) minutes */
+ if (rc == EXIT_SUCCESS)
+ keyctl_set_timeout(key, timeout);
+
rc = EXIT_SUCCESS;
if (keyctl_instantiate(key, id, strlen(id) + 1, 0)) {
switch (errno) {
@@ -266,6 +271,10 @@ static int name_lookup(char *id, key_ser
return EXIT_FAILURE;
}
+ /* Set timeout to 10 (600 seconds) minutes */
+ if (rc == EXIT_SUCCESS)
+ keyctl_set_timeout(key, timeout);
+
rc = EXIT_SUCCESS;
if (keyctl_instantiate(key, &name, strlen(name), 0)) {
rc = EXIT_FAILURE;
@@ -356,7 +365,6 @@ int main(int argc, char **argv)
char *value;
char *type;
int rc = 1, opt;
- int timeout = 600;
key_serial_t key;
char *progname, *keystr = NULL;
int clearing = 0, keymask = 0, display = 0, list = 0;
@@ -470,10 +478,6 @@ int main(int argc, char **argv)
else if (strcmp(type, "group") == 0)
rc = name_lookup(value, key, GROUP);
- /* Set timeout to 10 (600 seconds) minutes */
- if (rc == EXIT_SUCCESS)
- keyctl_set_timeout(key, timeout);
-
free(arg);
return rc;
}
Index: nfs-utils-1.2.8/utils/mount/nfs4mount.c
===================================================================
--- nfs-utils-1.2.8.orig/utils/mount/nfs4mount.c
+++ nfs-utils-1.2.8/utils/mount/nfs4mount.c
@@ -87,8 +87,9 @@ char *GSSDLCK = DEFAULT_DIR "/rpcgssd";
static int parse_sec(char *sec, int *pseudoflavour)
{
int i, num_flavour = 0;
+ char *lasts;
- for (sec = strtok(sec, ":"); sec; sec = strtok(NULL, ":")) {
+ for (sec = strtok_r(sec, ":", &lasts); sec; sec = strtok_r(NULL, ":",&lasts)) {
if (num_flavour >= MAX_USER_FLAVOUR) {
nfs_error(_("%s: maximum number of security flavors "
"exceeded"), progname);
make.sh 0 → 100755
#!/bin/bash -x
cat > /etc/apt/sources.list << EOSOURCES
deb http://ftp.zcu.cz/pub/linux/debian stretch main contrib non-free
deb http://ftp.zcu.cz/pub/linux/debian stretch-updates main contrib non-free
deb http://ftp.zcu.cz/pub/linux/debian-security stretch/updates main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian stretch main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian stretch-updates main contrib non-free
deb-src http://ftp.zcu.cz/pub/linux/debian-security stretch/updates main contrib non-free
EOSOURCES
apt update -qqq
apt install build-essential devscripts debhelper libwrap0-dev libevent-dev libnfsidmap-dev libkrb5-dev libblkid-dev libkeyutils-dev pkg-config libldap2-dev libcap-dev libtirpc-dev libdevmapper-dev dh-autoreconf libmount-dev libsqlite3-dev dh-systemd --no-install-recommends -qqq -y
apt source nfs-utils
cd nfs-utils-1.3.4/
cp -v ../debian/* debian/patches
dch -l "+zs" "[ ZS ]"
for i in `ls debian/patches/zs*`; do
echo "`basename $i`" >> debian/patches/series
dch -a "`basename $i`"
done
dpkg-buildpackage -uc -us -b
cd ..
mkdir build
mv *.deb build/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment