X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Flibiam.c;h=1b1269613ca61afaaf843091d9c4c97f52e0ce5f;hb=5fbb786b96b7db3a977dd8a8fca9a40f52f66b82;hp=dcdc8756c55d180d1b9ebc405c39d39a5031ab52;hpb=857874862ddffa816593e8d1c1f65587ca226bb7;p=fs%2Flustre-release.git diff --git a/lustre/utils/libiam.c b/lustre/utils/libiam.c index dcdc875..1b12696 100644 --- a/lustre/utils/libiam.c +++ b/lustre/utils/libiam.c @@ -1,31 +1,45 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: +/* + * GPL HEADER START + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * libiam.c - * iam user level library + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 only, + * as published by the Free Software Foundation. * - * Copyright (c) 2006 Cluster File Systems, Inc. - * Author: Wang Di - * Author: Nikita Danilov - * Author: Fan Yong + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License version 2 for more details (a copy is included + * in the LICENSE file that accompanied this code). * - * This file is part of the Lustre file system, http://www.lustre.org - * Lustre is a trademark of Cluster File Systems, Inc. + * You should have received a copy of the GNU General Public License + * version 2 along with this program; If not, see + * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * You may have signed or agreed to another license before downloading - * this software. If so, you are bound by the terms and conditions - * of that agreement, and the following does not apply to you. See the - * LICENSE file included with this distribution for more information. + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. * - * If you did not agree to a different license, then this copy of Lustre - * is open source software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. + * GPL HEADER END + */ +/* + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Use is subject to license terms. * - * In either case, Lustre is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * license text for more details. + * Copyright (c) 2014, 2015, Intel Corporation. + */ +/* + * This file is part of Lustre, http://www.lustre.org/ + * Lustre is a trademark of Sun Microsystems, Inc. + * + * lustre/utils/libiam.c + * + * iam user level library + * + * Author: Wang Di + * Author: Nikita Danilov + * Author: Fan Yong */ #include @@ -35,15 +49,11 @@ #include #include #include - +#include #include -#ifdef HAVE_ENDIAN_H -#include -#endif - -#include -#include +#include +#include #include typedef __u32 lvar_hash_t; @@ -337,7 +347,7 @@ static char *iam_convert(int size, int need_convert, char *source) free(opt); } } else { - strncpy(ptr, source, size + 1); + strlcpy(ptr, source, size + 1); } return ptr;