login.c (87866) | login.c (88282) |
---|---|
1/* 2 * Copyright (c) 2000, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 2000, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $Id: login.c,v 1.5 2001/01/28 07:35:00 bp Exp $ | 32 * $Id: login.c,v 1.6 2001/08/22 03:33:38 bp Exp $ |
33 */ 34#include <sys/param.h> 35#include <sys/errno.h> 36#include <sys/stat.h> 37#include <err.h> 38#include <stdio.h> 39#include <unistd.h> 40#include <strings.h> --- 32 unchanged lines hidden (view full) --- 73 case 'D': 74 setprimary = 1; 75 break; 76 default: 77 login_usage(); 78 /*NOTREACHED*/ 79 } 80 } | 33 */ 34#include <sys/param.h> 35#include <sys/errno.h> 36#include <sys/stat.h> 37#include <err.h> 38#include <stdio.h> 39#include <unistd.h> 40#include <strings.h> --- 32 unchanged lines hidden (view full) --- 73 case 'D': 74 setprimary = 1; 75 break; 76 default: 77 login_usage(); 78 /*NOTREACHED*/ 79 } 80 } |
81#ifdef APPLE 82 if (loadsmbvfs()) 83 errx(EX_OSERR, "SMB filesystem is not available"); 84#endif |
|
81 if (smb_ctx_resolve(ctx) != 0) 82 exit(1); 83 level = ctx->ct_parsedlevel; 84 error = smb_ctx_lookup(ctx, level, 0); 85 if (error == 0) { 86 smb_error("connection already exists", error); 87 exit(0); 88 } --- 45 unchanged lines hidden (view full) --- 134 if (error) 135 exit(1); 136 break; 137 default: 138 logout_usage(); 139 /*NOTREACHED*/ 140 } 141 } | 85 if (smb_ctx_resolve(ctx) != 0) 86 exit(1); 87 level = ctx->ct_parsedlevel; 88 error = smb_ctx_lookup(ctx, level, 0); 89 if (error == 0) { 90 smb_error("connection already exists", error); 91 exit(0); 92 } --- 45 unchanged lines hidden (view full) --- 138 if (error) 139 exit(1); 140 break; 141 default: 142 logout_usage(); 143 /*NOTREACHED*/ 144 } 145 } |
146#ifdef APPLE 147 error = loadsmbvfs(); 148 if (error) 149 errx(EX_OSERR, "SMB filesystem is not available"); 150#endif |
|
142 ctx->ct_ssn.ioc_opt &= ~SMBVOPT_CREATE; 143 ctx->ct_sh.ioc_opt &= ~SMBSOPT_CREATE; 144 if (smb_ctx_resolve(ctx) != 0) 145 exit(1); 146 level = ctx->ct_parsedlevel; 147 error = smb_ctx_lookup(ctx, level, 0); 148 if (error == ENOENT) { 149/* ctx->ct_ssn.ioc_opt |= SMBCOPT_SINGLE; --- 53 unchanged lines hidden --- | 151 ctx->ct_ssn.ioc_opt &= ~SMBVOPT_CREATE; 152 ctx->ct_sh.ioc_opt &= ~SMBSOPT_CREATE; 153 if (smb_ctx_resolve(ctx) != 0) 154 exit(1); 155 level = ctx->ct_parsedlevel; 156 error = smb_ctx_lookup(ctx, level, 0); 157 if (error == ENOENT) { 158/* ctx->ct_ssn.ioc_opt |= SMBCOPT_SINGLE; --- 53 unchanged lines hidden --- |